db

package
v0.0.0-...-6d5d60b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultNewOrmer

func GetDefaultNewOrmer() orm.Ormer

获取默认ormer

func GetNewOrmer

func GetNewOrmer(dbName string) orm.Ormer

获取ormer

func InitRDB

func InitRDB(cfg config.DataSource) error

Types

type Ldb

type Ldb struct {
	*leveldb.DB
}

func InitLDB

func InitLDB(dbFilePath string) (*Ldb, error)

init

func (*Ldb) DelKey

func (this *Ldb) DelKey(key []byte) error

del key

func (*Ldb) DeleteByte

func (this *Ldb) DeleteByte(key []byte) error

func (*Ldb) GetByte

func (this *Ldb) GetByte(key []byte) ([]byte, error)

func (*Ldb) GetDb

func (this *Ldb) GetDb() *leveldb.DB

func (*Ldb) GetPrifix

func (this *Ldb) GetPrifix(keyPrefix []byte) (map[string]string, error)

查询前缀

func (*Ldb) PutByte

func (this *Ldb) PutByte(key, value []byte) error

func (*Ldb) PutStrWithPrifix

func (this *Ldb) PutStrWithPrifix(keyPri, key, value string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL