db

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: GPL-3.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDBReader

type IDBReader interface {
	Get(key []byte) (value []byte, err error)
	Gets(key []byte, count uint) (keys [][]byte, value [][]byte, err error)
	GetIterator(key []byte) (iterator IIterator, err error)
}

type IDBReaderWriter

type IDBReaderWriter interface {
	IDBReader
	IDBWriter
}

type IDBWriter

type IDBWriter interface {
	Put(key []byte, value []byte) (err error)
	Puts(keys [][]byte, values [][]byte) (err error)
	Delete(key []byte) (err error)
	Drop() (err error)
}

type IDatabase

type IDatabase interface {
	OpenReader(dbName string) (reader IDatabaseReader, err error)
	OpenWriter(dbName string) (writer IDatabaseWriter, err error)
	Open(dbName string) (rw IDatabaseWriterReader, err error)
	Snapshot() (ISnapshot, error)
	Close() (err error)
}

type IDatabaseReader

type IDatabaseReader interface {
	IDBReader
}

type IDatabaseWriter

type IDatabaseWriter interface {
	IDBWriter
}

type IDatabaseWriterReader

type IDatabaseWriterReader interface {
	IDBReaderWriter
}

type IIterator

type IIterator interface {
	Next() (err error)
	Prev() (err error)
	Key() (key []byte, err error)
	Value() (value []byte, err error)
	Close()
}

IIterator mdbx must close

type ISnapshot

type ISnapshot interface {
	Put(dbName string, key []byte, value []byte) (err error)
	Get(dbName string, key []byte) (value []byte, err error)
	Commit() error
	Rollback()
}

Jump to

Keyboard shortcuts

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