package
1.2.20
Repository: https://github.com/qitmeer/qng-core.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

Create initializes and opens a database for the specified type.
IsError returns whether err is an Error with a matching error code.
Open opens an existing database for the specified type.
RegisterDriver adds a backend database driver to available interfaces.
SupportedDrivers returns a slice of strings that represent the database drivers that have been registered and are therefore supported.
UseLogger uses a specified Logger to the registered database drivers .

# Constants

ErrBlockExists indicates a block with the provided hash already exists in the database.
ErrBlockNotFound indicates a block with the provided hash does not exist in the database.
ErrBlockRegionInvalid indicates a region that exceeds the bounds of the specified block was requested.
ErrBucketExists indicates an attempt to create a bucket that already exists.
ErrBucketNameRequired indicates an attempt to create a bucket with a blank name.
ErrBucketNotFound indicates an attempt to access a bucket that has not been created yet.
ErrCorruption indicates a checksum failure occurred which invariably means the database is corrupt.
ErrDbAlreadyOpen indicates open was called on a database that is already open.
ErrDbDoesNotExist indicates open is called for a database that does not exist.
ErrDbExists indicates create is called for a database that already exists.
ErrDbNotOpen indicates a database instance is accessed before it is opened or after it is closed.
ErrDbTypeRegistered indicates two different database drivers attempt to register with the name database type.
ErrDbUnknownType indicates there is no driver registered for the specified database type.
ErrDriverSpecific indicates the Err field is a driver-specific error.
ErrIncompatibleValue indicates the value in question is invalid for the specific requested operation.
ErrInvalid indicates the specified database is not valid.
ErrKeyRequired indicates at attempt to insert a zero-length key.
ErrKeyTooLarge indicates an attmempt to insert a key that is larger than the max allowed key size.
ErrTxClosed indicates an attempt was made to commit or rollback a transaction that has already had one of those operations performed.
ErrTxNotWritable indicates an operation that requires write access to the database was attempted against a read-only transaction.
ErrValueTooLarge indicates an attmpt to insert a value that is larger than max allowed value size.

# Structs

BlockRegion specifies a particular region of a block identified by the specified hash, given an offset and length.
Driver defines a structure for backend drivers to use when they register themselves as a backend which implements the DB interface.
Error provides a single type for errors that can happen during database operation.

# Interfaces

Bucket represents a collection of key/value pairs.
Cursor represents a cursor over key/value pairs and nested buckets of a bucket.
DB provides a generic interface that is used to store blocks and related metadata.
Tx represents a database transaction.

# Type aliases

ErrorCode identifies a kind of error.