Source File
doc.go
Belonging Package
github.com/dgraph-io/badger/v4
/*Package badger implements an embeddable, simple and fast key-value database,written in pure Go. It is designed to be highly performant for both reads andwrites simultaneously. Badger uses Multi-Version Concurrency Control (MVCC), andsupports transactions. It runs transactions concurrently, with serializablesnapshot isolation guarantees.Badger uses an LSM tree along with a value log to separate keys from values,hence reducing both write amplification and the size of the LSM tree. Thisallows LSM tree to be served entirely from RAM, while the values are servedfrom SSD.# UsageBadger has the following main types: DB, Txn, Item and Iterator. DB containskeys that are associated with values. It must be opened with the appropriateoptions before it can be accessed.All operations happen inside a Txn. Txn represents a transaction, which canbe read-only or read-write. Read-only transactions can read values for agiven key (which are returned inside an Item), or iterate over a set ofkey-value pairs using an Iterator (which are returned as Item type values aswell). Read-write transactions can also update and delete keys from the DB.See the examples for more usage details.*/package badger
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |