Documentation
¶
Index ¶
- Constants
- type LMDB
- func (l *LMDB) Close() error
- func (l *LMDB) Delete(key []byte) error
- func (l *LMDB) DeleteSync(key []byte) error
- func (l *LMDB) Get(key []byte) ([]byte, error)
- func (l *LMDB) Has(key []byte) (bool, error)
- func (l *LMDB) Iterator(start, end []byte) (db.Iterator, error)
- func (l *LMDB) NewBatch() db.Batch
- func (l *LMDB) NewBatchWithSize(_ int) db.Batch
- func (l *LMDB) Print() error
- func (l *LMDB) ReverseIterator(start, end []byte) (db.Iterator, error)
- func (l *LMDB) Set(key, value []byte) error
- func (l *LMDB) SetSync(key, value []byte) error
- func (l *LMDB) Stats() map[string]string
Constants ¶
View Source
const DefaultMapSize int64 = 1 << 40
DefaultMapSize is the default maximum database size (1 TB).
View Source
const (
LMDBBackend db.BackendType = "lmdbdb"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LMDB ¶
type LMDB struct {
// contains filtered or unexported fields
}
LMDB wraps an lmdb.Env + DBI handle.
func NewLMDBWithOptions ¶
NewLMDBWithOptions opens an LMDB database with custom map size and flags. Extra flags are OR'd with the base flags (NoMetaSync | WriteMap | NoReadahead).
func (*LMDB) DeleteSync ¶
func (*LMDB) Iterator ¶
Iterator implements db.DB. The caller MUST call Close() on the returned iterator to release resources. Close() on the LMDB will block until all iterators are closed.
func (*LMDB) ReverseIterator ¶
ReverseIterator implements db.DB. The caller MUST call Close() on the returned iterator to release resources. Close() on the LMDB will block until all iterators are closed.
Click to show internal directories.
Click to hide internal directories.