mdbxdb

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0, UNKNOWN, UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMapSize int = 1 << 40

DefaultMapSize is the default maximum database size (1 TB).

View Source
const (
	MDBXBackend db.BackendType = "mdbxdb"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MDBX

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

MDBX wraps an mdbx.Env + DBI handle.

func NewMDBX

func NewMDBX(name, dir string) (*MDBX, error)

NewMDBX opens an MDBX database with production defaults.

func NewMDBXWithOptions

func NewMDBXWithOptions(name, dir string, mapSize int, extraFlags uint) (*MDBX, error)

NewMDBXWithOptions opens an MDBX database with custom map size and flags. Extra flags are OR'd with the base flags (NoMetaSync | WriteMap | NoReadahead).

func (*MDBX) Close

func (m *MDBX) Close() error

func (*MDBX) Delete

func (m *MDBX) Delete(key []byte) error

func (*MDBX) DeleteSync

func (m *MDBX) DeleteSync(key []byte) error

func (*MDBX) Get

func (m *MDBX) Get(key []byte) ([]byte, error)

func (*MDBX) Has

func (m *MDBX) Has(key []byte) (bool, error)

func (*MDBX) Iterator

func (m *MDBX) Iterator(start, end []byte) (db.Iterator, error)

Iterator implements db.DB. The caller MUST call Close() on the returned iterator to release resources.

func (*MDBX) NewBatch

func (m *MDBX) NewBatch() db.Batch

func (*MDBX) NewBatchWithSize

func (m *MDBX) NewBatchWithSize(_ int) db.Batch

func (*MDBX) Print

func (m *MDBX) Print() error

func (*MDBX) ReverseIterator

func (m *MDBX) ReverseIterator(start, end []byte) (db.Iterator, error)

ReverseIterator implements db.DB. The caller MUST call Close() on the returned iterator to release resources.

func (*MDBX) Set

func (m *MDBX) Set(key, value []byte) error

func (*MDBX) SetSync

func (m *MDBX) SetSync(key, value []byte) error

func (*MDBX) Stats

func (m *MDBX) Stats() map[string]string

Jump to

Keyboard shortcuts

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