lmdb-go

module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2015 License: BSD-3-Clause

README

#lmdb-go Build Status

Go bindings to the OpenLDAP Lightning Memory-Mapped Database (LMDB).

Key Features

  • Fast zero-copy reads for applications with high performance requirements. Zero-copy behavior is specified at the transaction level to reduce instrumentation overhead.
err := lmdb.View(func(txn *lmdb.Txn) error {
    txn.RawRead = true
    val, err := txn.Get(dbi, []byte("largevalue"), 0)
    // ...
})
  • API inspired by BoltDB with automatic commit/rollback of transactions. The goal of lmdb-go is to provide idiomatic, safe database interactions without compromising the flexibility of the C API.

  • Subtransactions are fully supported and safe to use with the same idiomatic API.

  • Comprehensive documentation and code examples.

#Build

go get github.com/bmatsuo/lmdb-go/lmdb

There is no dependency on LMDB dynamic library.

On FreeBSD 10, you must explicitly set CC (otherwise it will fail with a cryptic error), for example:

CC=clang go test -v ./...

#Documentation

The best source of documentation is the official LMDB C API documentation reachable through the LMDB homepage.

Documentation specific to the Go bindings and how methods differ from their underlying C counterparts can be found on godoc.org.

Directories

Path Synopsis
exp
cmd/lmdb_cat command
cmd/lmdb_copy command
cmd/lmdb_stat command
lmdbscan
Package lmdbscan provides a wrapper for lmdb.Cursor to simplify iteration.
Package lmdbscan provides a wrapper for lmdb.Cursor to simplify iteration.
lmdbsync
Package lmdbsync provides advanced synchronization for LMDB environments at the cost of performance.
Package lmdbsync provides advanced synchronization for LMDB environments at the cost of performance.
Package lmdb provides bindings to the lmdb C API.
Package lmdb provides bindings to the lmdb C API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL