Documentation ¶
Index ¶
- type LevelDBDriver
- func (l *LevelDBDriver) Close() error
- func (l *LevelDBDriver) Delete(dbName, key string) error
- func (l *LevelDBDriver) Get(dbName, key string) ([]byte, error)
- func (l *LevelDBDriver) GetArrJson(dbName string, key string) ([]map[string]interface{}, error)
- func (l *LevelDBDriver) GetDB(dbName string) (*goleveldb.DB, error)
- func (l *LevelDBDriver) GetDBName(dbName string) string
- func (l *LevelDBDriver) GetJson(dbName, key string) (map[string]interface{}, error)
- func (l *LevelDBDriver) GetRangeNum(dbName string, start string, end string) (int, error)
- func (l *LevelDBDriver) IterAll(dbName string) error
- func (l *LevelDBDriver) IterAllLen(dbName string) (int, error)
- func (l *LevelDBDriver) IteratorByPrefix(dbName string, prefix string) (map[string][]byte, error)
- func (l *LevelDBDriver) IteratorByRange(dbName string, start, end string) ([]map[string]interface{}, error)
- func (l *LevelDBDriver) IteratorStrByRange(dbName string, start, end string) ([]map[string]string, error)
- func (l *LevelDBDriver) Put(dbName, key string, value []byte) error
- func (l *LevelDBDriver) Remove(dbName string, start string, end string, nums int) error
- func (l *LevelDBDriver) Truncate(dbName string) error
- func (l *LevelDBDriver) WriteByArray(dbName string, key string, value interface{}) error
- func (l *LevelDBDriver) WriteJson(dbName string, key string, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LevelDBDriver ¶
type LevelDBDriver struct {
// contains filtered or unexported fields
}
支持按照文件名返回连接
func NewLevelDBDriver ¶
func NewLevelDBDriver(prefix string) (*LevelDBDriver, error)
func (*LevelDBDriver) Close ¶
func (l *LevelDBDriver) Close() error
func (*LevelDBDriver) Delete ¶
func (l *LevelDBDriver) Delete(dbName, key string) error
func (*LevelDBDriver) GetArrJson ¶
func (l *LevelDBDriver) GetArrJson(dbName string, key string) ([]map[string]interface{}, error)
func (*LevelDBDriver) GetDBName ¶
func (l *LevelDBDriver) GetDBName(dbName string) string
func (*LevelDBDriver) GetJson ¶
func (l *LevelDBDriver) GetJson(dbName, key string) (map[string]interface{}, error)
func (*LevelDBDriver) GetRangeNum ¶
func (*LevelDBDriver) IterAll ¶
func (l *LevelDBDriver) IterAll(dbName string) error
func (*LevelDBDriver) IterAllLen ¶
func (l *LevelDBDriver) IterAllLen(dbName string) (int, error)
func (*LevelDBDriver) IteratorByPrefix ¶
根据前缀获取key,value
func (*LevelDBDriver) IteratorByRange ¶
func (l *LevelDBDriver) IteratorByRange(dbName string, start, end string) ([]map[string]interface{}, error)
func (*LevelDBDriver) IteratorStrByRange ¶
func (l *LevelDBDriver) IteratorStrByRange(dbName string, start, end string) ([]map[string]string, error)
IteratorStrByRange 按照范围获取key-value
func (*LevelDBDriver) Truncate ¶
func (l *LevelDBDriver) Truncate(dbName string) error
func (*LevelDBDriver) WriteByArray ¶
func (l *LevelDBDriver) WriteByArray(dbName string, key string, value interface{}) error
写入数据 找给定key判断能否找到 能找到的话按照数组的格式往后添加数据
Click to show internal directories.
Click to hide internal directories.