goleveldb

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LevelDB

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

func New

func New(opts db.Options) (*LevelDB, error)

New returns a LevelDB which implements the db.Database interface

func (*LevelDB) Close

func (d *LevelDB) Close() error

func (*LevelDB) Commit

func (d *LevelDB) Commit(batch *leveldb.Batch) error

func (*LevelDB) Compact

func (d *LevelDB) Compact() error

Compact implements the db.Database.Compact interface method.

func (*LevelDB) Delete

func (d *LevelDB) Delete(key []byte) error

func (*LevelDB) Get

func (d *LevelDB) Get(key []byte) ([]byte, error)

func (*LevelDB) Iterate

func (d *LevelDB) Iterate(prefix []byte, callback func(key, value []byte) bool) error

func (*LevelDB) Set

func (d *LevelDB) Set(key, value []byte) error

func (*LevelDB) WriteTx

func (d *LevelDB) WriteTx() db.WriteTx

type WriteTx

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

WriteTx implements the interface db.WriteTx for goleveldb

func (*WriteTx) Apply

func (tx *WriteTx) Apply(otherTx db.WriteTx) error

func (*WriteTx) Commit

func (tx *WriteTx) Commit() error

func (*WriteTx) Delete

func (tx *WriteTx) Delete(k []byte) error

func (*WriteTx) Discard

func (tx *WriteTx) Discard()

func (*WriteTx) Get

func (tx *WriteTx) Get(k []byte) ([]byte, error)

func (*WriteTx) Iterate

func (tx *WriteTx) Iterate(prefix []byte, callback func(k, v []byte) bool) error

func (*WriteTx) Set

func (tx *WriteTx) Set(k, v []byte) error

Jump to

Keyboard shortcuts

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