1 /*
2 Package badger implements an embeddable, simple and fast key-value database,
3 written in pure Go. It is designed to be highly performant for both reads and
4 writes simultaneously. Badger uses Multi-Version Concurrency Control (MVCC), and
5 supports transactions. It runs transactions concurrently, with serializable
6 snapshot isolation guarantees.
7 8 Badger uses an LSM tree along with a value log to separate keys from values,
9 hence reducing both write amplification and the size of the LSM tree. This
10 allows LSM tree to be served entirely from RAM, while the values are served
11 from SSD.
12 13 # Usage
14 15 Badger has the following main types: DB, Txn, Item and Iterator. DB contains
16 keys that are associated with values. It must be opened with the appropriate
17 options before it can be accessed.
18 19 All operations happen inside a Txn. Txn represents a transaction, which can
20 be read-only or read-write. Read-only transactions can read values for a
21 given key (which are returned inside an Item), or iterate over a set of
22 key-value pairs using an Iterator (which are returned as Item type values as
23 well). Read-write transactions can also update and delete keys from the DB.
24 25 See the examples for more usage details.
26 */
27 package badger
28