Documentation ¶
Overview ¶
Package ezdb provides the functions to make it easy to use levigo to interact golang apps with leveldb.
Index ¶
- Variables
- func IsIteratorValidForGoThrough(it *levigo.Iterator, keyEnd string) bool
- type DB
- func (db *DB) Close()
- func (db *DB) Delete(key []byte) (err error)
- func (db *DB) DeleteStr(key string) (err error)
- func (db *DB) Get(key []byte) (value []byte, err error)
- func (db *DB) GetInt64(key string) (value int64, err error)
- func (db *DB) GetStr(key string) (value string, err error)
- func (db *DB) GetUint64(key string) (value uint64, err error)
- func (db *DB) GoThrough(keyStart, keyEnd string, processor GoThroughProcessor) (err error)
- func (db *DB) KeyExist(key string) (exist bool, err error)
- func (db *DB) NewIterator() *levigo.Iterator
- func (db *DB) Put(key, value []byte) (err error)
- func (db *DB) PutInt64(key string, value int64) (err error)
- func (db *DB) PutStr(key, value string) (err error)
- func (db *DB) PutUint64(key string, value uint64) (err error)
- type GoThroughProcessor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DEBUG is debug mode. // Set this flag to true to output debug messages from this package. DEBUG = false )
Functions ¶
Types ¶
type DB ¶
type DB struct { LevigoDB *levigo.DB // Instance of levigo.DB // contains filtered or unexported fields }
DB is a wrapper of levigo.DB.
func (*DB) GetInt64 ¶
GetInt64 get string value and convert it to int64. It should be used with PutInt64().
func (*DB) GetUint64 ¶
GetUint64 get string value and convert it to uint64. It should be used with PutUInt64().
func (*DB) GoThrough ¶
func (db *DB) GoThrough(keyStart, keyEnd string, processor GoThroughProcessor) (err error)
GoThrough goes through the leveldb db and call the GoThroughProcessor.Process() to process data.
func (*DB) NewIterator ¶
NewIterator creates a new iterator of levigo.
type GoThroughProcessor ¶
GoThroughProcessor provides the interface to process leveldb record while go through the leveldb database.
Click to show internal directories.
Click to hide internal directories.