# Functions
Batch is identical to the Update call, but it attempts to combine several individual Update transactions into a single write database transaction on an optimistic basis.
ForAll is an optimized version of ForEach with the limitation that no additional queries can be executed within the callback.
GetBoltBackend opens (or creates if doesn't exits) a bbolt backed database and returns a kvdb.Backend wrapping it.
GetTestBackend opens (or creates if doesn't exist) a bbolt or etcd backed database (for testing), and returns a kvdb.Backend and a cleanup func.
LoggableKeyName returns a printable name of the given key.
No description provided by the author
No description provided by the author
Prefetch will attempt to prefetch all values under a path from the passed bucket.
RootBucket is a wrapper to ExtendedRTx.RootBucket which does nothing if the implementation doesn't have ExtendedRTx.
RunTests is a helper function to run the tests in a package with initialization and tear-down of a test kvdb backend.
No description provided by the author
StartEtcdTestBackend is a stub returning nil, and errEtcdNotAvailable error.
StartSqliteTestBackend is a stub returning nil, and errSqliteNotAvailable error.
Update opens a database read/write transaction and executes the function f with the transaction passed as a parameter.
UseLogger uses a specified Logger to output package logging info.
View opens a database read transaction and executes the function f with the transaction passed as a parameter.
# Constants
BoltBackendName is the name of the backend that should be passed into kvdb.Create to initialize a new instance of kvdb.Backend backed by a live instance of bbolt.
DefaultBoltAutoCompactMinAge is the default minimum time that must have passed since a bolt database file was last compacted for the compaction to be considered again.
DefaultDBTimeout specifies the default timeout value when opening the bbolt database.
DefaultTempDBFileName is the default name of the temporary bolt DB file that we'll use to atomically compact the primary DB file on startup.
EtcdBackend is conditionally set to false when the kvdb_etcd build tag is not defined.
EtcdBackendName is the name of the backend that should be passed into kvdb.Create to initialize a new instance of kvdb.Backend backed by a live instance of etcd.
LastCompactionFileNameSuffix is the suffix we append to the file name of a database file to record the timestamp when the last compaction occurred.
No description provided by the author
PostgresBackendName is the name of the backend that should be passed into kvdb.Create to initialize a new instance of kvdb.Backend backed by a live instance of postgres.
SqliteBackend is conditionally set to false when the kvdb_sqlite build tag is not defined.
SqliteBackendName is the name of the backend that should be passed into kvdb.Create to initialize a new instance of kvdb.Backend backed by a live instance of sqlite.
# Variables
Create initializes and opens a database for the specified type.
ErrBucketExists is returned when creating a bucket that already exists.
ErrBucketNotFound is returned when trying to access a bucket that has not been created yet.
ErrDatabaseNotOpen is returned when a database instance is accessed before it is opened or after it is closed.
Open opens an existing database for the specified type.
# Structs
BoltBackendConfig is a struct that holds settings specific to the bolt database backend.
BoltConfig holds bolt configuration.
No description provided by the author
# Interfaces
ExtendedRBucket is an extension to walletdb.ReadBucket to allow prefetching of all values inside buckets.
ExtendedRTx is an extension to walletdb.ReadTx to allow prefetching of keys.
# Type aliases
Backend represents an ACID database.
Driver defines a structure for backend drivers to use when they registered themselves as a backend which implements the Backend interface.
RBucket represents a bucket (a hierarchical structure within the database) that is only allowed to perform read operations.
RCursor represents a bucket cursor that can be positioned at the start or end of the bucket's key/value pairs and iterate over pairs in the bucket.
RTx represents a database transaction that can only be used for reads.
RwBucket represents a bucket (a hierarchical structure within the database) that is allowed to perform both read and write operations.
RwCursor represents a bucket cursor that can be positioned at the start or end of the bucket's key/value pairs and iterate over pairs in the bucket.
RwTx represents a database transaction that can be used for both reads and writes.