Documentation ¶
Index ¶
- func NewDbHandle()
- type DbHandle
- func (d *DbHandle) Close() error
- func (d *DbHandle) Delete(key []byte) error
- func (d *DbHandle) Get(key []byte) ([]byte, error)
- func (d *DbHandle) Has(key []byte) (bool, error)
- func (d *DbHandle) NewIteratorWithRange(startKey []byte, limitKey []byte) (iterator.Iterator, error)
- func (d *DbHandle) Put(key []byte, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DbHandle ¶
type DbHandle struct {
// contains filtered or unexported fields
}
DbHandle 数据库操作对象
var Db *DbHandle
Db 数据库全局对象
func (*DbHandle) Get ¶
Get returns the value for the given key, or returns nil if none exists
@receiver d @param key @return []byte @return error
func (*DbHandle) Has ¶
Has return true if the given key exist, or return false if none exists
@receiver d @param key @return bool @return error
func (*DbHandle) NewIteratorWithRange ¶
func (d *DbHandle) NewIteratorWithRange(startKey []byte, limitKey []byte) (iterator.Iterator, error)
NewIteratorWithRange returns an iterator that contains all the key-values between given key ranges start is included in the results and limit is excluded.
@receiver d @param startKey @param limitKey @return iterator.Iterator @return error
Click to show internal directories.
Click to hide internal directories.