lmdb

package
v0.0.0-...-7833c67 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBI

type DBI struct {
	*mdbx.DBI
	// contains filtered or unexported fields
}

func (*DBI) Delete

func (db *DBI) Delete(key []byte) (err error)

func (*DBI) Drop

func (db *DBI) Drop() (err error)

func (*DBI) Get

func (db *DBI) Get(key []byte) (value []byte, err error)

func (*DBI) GetIterator

func (db *DBI) GetIterator(key []byte) (iterator db.IIterator, err error)

func (*DBI) Gets

func (db *DBI) Gets(key []byte, count uint) (keys [][]byte, values [][]byte, err error)

func (*DBI) Put

func (db *DBI) Put(key []byte, value []byte) (err error)

func (*DBI) Puts

func (db *DBI) Puts(keys [][]byte, values [][]byte) (err error)

type DBISnapshot

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

func (*DBISnapshot) Commit

func (db *DBISnapshot) Commit() error

func (*DBISnapshot) Get

func (db *DBISnapshot) Get(dbName string, key []byte) (value []byte, err error)

func (*DBISnapshot) IsRunning

func (db *DBISnapshot) IsRunning() bool

func (*DBISnapshot) Put

func (db *DBISnapshot) Put(dbName string, key []byte, value []byte) (err error)

func (*DBISnapshot) Rollback

func (db *DBISnapshot) Rollback()

type Iterator

type Iterator struct {
	*mdbx.Cursor
	// contains filtered or unexported fields
}

func (*Iterator) Close

func (it *Iterator) Close()

func (*Iterator) Key

func (it *Iterator) Key() ([]byte, error)

func (*Iterator) Next

func (it *Iterator) Next() error

func (*Iterator) Prev

func (it *Iterator) Prev() error

func (*Iterator) Value

func (it *Iterator) Value() ([]byte, error)

type Lmdb

type Lmdb struct {
	*mdbx.Env
	// contains filtered or unexported fields
}

func NewLMDB

func NewLMDB(c context.Context, nodeConfig *conf.NodeConfig, config *conf.DatabaseConfig) (*Lmdb, error)

func (*Lmdb) Close

func (m *Lmdb) Close() (err error)

func (*Lmdb) Open

func (m *Lmdb) Open(dbName string) (rw db.IDatabaseWriterReader, err error)

func (*Lmdb) OpenReader

func (m *Lmdb) OpenReader(dbName string) (reader db.IDatabaseReader, err error)

func (*Lmdb) OpenWriter

func (m *Lmdb) OpenWriter(dbName string) (writer db.IDatabaseWriter, err error)

func (*Lmdb) Snapshot

func (m *Lmdb) Snapshot() (db.ISnapshot, error)

Snapshot:

Jump to

Keyboard shortcuts

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