wdb

package
v0.0.0-...-4e24f74 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(setting Setting)

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func GetDB

func GetDB(name string) *DB

func (*DB) Delete

func (m *DB) Delete(key string) bool

func (*DB) Get

func (m *DB) Get(key string) []byte

根据key获得一个值

func (*DB) GetByPrefix

func (m *DB) GetByPrefix(key string) (result *w.WArray)

根据key前缀获取集合

func (*DB) GetBySub

func (m *DB) GetBySub(key string, subs []string) interface{}

根据key 选择返回指定的子属性 key的数据结构只能为 [] 或 {} 或 [{},{}] 否则反回空值

func (*DB) GetString

func (m *DB) GetString(key string) string

func (*DB) Has

func (m *DB) Has(key string) bool

func (*DB) Put

func (m *DB) Put(key, value string) error

增加一个值

func (*DB) SizeOf

func (m *DB) SizeOf(start, limit string) int64

type Setting

type Setting struct {
	Path      string
	Databases []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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