modulepackage
0.0.0-20240822011022-aed6d4850399
Repository: https://github.com/metacubex/bbolt.git
Documentation: pkg.go.dev
# Functions
Compact will create a copy of the source DB and in the destination DB.
HexKVStringer serializes both key & value to hex representation.
Open creates and opens a database at the given path.
No description provided by the author
# Constants
Default values if not set in a DB instance.
DefaultFillPercent is the percentage that split pages are filled.
Default values if not set in a DB instance.
Default values if not set in a DB instance.
FreelistArrayType indicates backend freelist type is array.
FreelistMapType indicates backend freelist type is hashmap.
IgnoreNoSync specifies whether the NoSync field of a DB is ignored when syncing changes to a file.
MaxKeySize is the maximum length of a key, in bytes.
MaxValueSize is the maximum length of a value, in bytes.
# Variables
DefaultOptions represent the options used if nil options are passed into Open().
ErrBucketExists is returned when creating a bucket that already exists.
ErrBucketNameRequired is returned when creating a bucket with a blank name.
ErrBucketNotFound is returned when trying to access a bucket that has not been created yet.
ErrChecksum is returned when either meta page checksum does not match.
ErrDatabaseNotOpen is returned when a DB instance is accessed before it is opened or after it is closed.
ErrDatabaseOpen is returned when opening a database that is already open.
ErrDatabaseReadOnly is returned when a mutating transaction is started on a read-only database.
ErrFreePagesNotLoaded is returned when a readonly transaction without preloading the free pages is trying to access the free pages.
ErrIncompatibleValue is returned when trying create or delete a bucket on an existing non-bucket key or when trying to create or delete a non-bucket key on an existing bucket key.
ErrInvalid is returned when both meta pages on a database are invalid.
ErrInvalidMapping is returned when the database file fails to get mapped.
ErrKeyRequired is returned when inserting a zero-length key.
ErrKeyTooLarge is returned when inserting a key that is larger than MaxKeySize.
ErrTimeout is returned when a database cannot obtain an exclusive lock on the data file after the timeout passed to Open().
ErrTxClosed is returned when committing or rolling back a transaction that has already been committed or rolled back.
ErrTxNotWritable is returned when performing a write operation on a read-only transaction.
ErrValueTooLarge is returned when inserting a value that is larger than MaxValueSize.
ErrVersionMismatch is returned when the data file was created with a different version of Bolt.
# Structs
Bucket represents a collection of key/value pairs inside the database.
BucketStats records statistics about resources used by a bucket.
Cursor represents an iterator that can traverse over all key/value pairs in a bucket in lexicographical order.
DB represents a collection of buckets persisted to a file on disk.
No description provided by the author
Options represents the options that can be set when opening a database.
PageInfo represents human readable information about a page.
Stats represents statistics about the database.
Tx represents a read-only or read/write transaction on the database.
TxStats represents statistics about the actions performed by the transaction.
# Interfaces
KVStringer allows to prepare human-readable diagnostic messages.
# Type aliases
No description provided by the author
FreelistType is the type of the freelist backend.