An embedded key/value database for Go
open sourceMITfree
bbolt is a pure Go embedded key/value store, the etcd project's maintained fork of Ben Johnson's Bolt (archived in 2018), keeping Bolt's API while adding bug fixes, performance improvements and features. Inspired by LMDB, it keeps everything in a single file for programs that don't need a database server such as Postgres or MySQL: keys and values live in buckets, which can be nested, with cursors for ordered iteration and range and prefix scans, and transactions where one read-write transaction runs at a time alongside any number of read-only ones, each seeing a consistent snapshot. It also has a bbolt command-line tool for inspecting database files. It's maintained under the etcd project.
Problems it solves
- an embedded key/value database for a Go program with no server to run
- store data in a single file from Go with ACID-style transactions
- a maintained replacement for the archived BoltDB
Features
- Pure Go, single-file storage
- Buckets, nested buckets and auto-incrementing sequences
- Cursors for ordered, range and prefix iteration
- One read-write transaction alongside many read-only ones, with consistent snapshots
- Batch read-write transactions
- bbolt command-line utility
Limitations
- Only one read-write transaction at a time1
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what bbolt does.
