Versions in this module Expand all Collapse all v1 v1.3.1 Jul 17, 2017 Changes in this version type Bucket + func (b *Bucket) Sequence() uint64 + func (b *Bucket) SetSequence(v uint64) error v1.3.0 Aug 18, 2016 v1.2.1 May 16, 2016 v1.2.0 Mar 22, 2016 Changes in this version + const DefaultAllocSize type DB + AllocSize int + MmapFlags int type Options + InitialMmapSize int + MmapFlags int type Tx + WriteFlag int v1.1.0 Oct 21, 2015 Changes in this version + const DefaultFillPercent + const DefaultMaxBatchDelay + const DefaultMaxBatchSize + const IgnoreNoSync + const MaxKeySize + const MaxValueSize + var DefaultOptions = &Options + var ErrBucketExists = errors.New("bucket already exists") + var ErrBucketNameRequired = errors.New("bucket name required") + var ErrBucketNotFound = errors.New("bucket not found") + var ErrChecksum = errors.New("checksum error") + var ErrDatabaseNotOpen = errors.New("database not open") + var ErrDatabaseOpen = errors.New("database already open") + var ErrDatabaseReadOnly = errors.New("database is in read-only mode") + var ErrIncompatibleValue = errors.New("incompatible value") + var ErrInvalid = errors.New("invalid database") + var ErrKeyRequired = errors.New("key required") + var ErrKeyTooLarge = errors.New("key too large") + var ErrTimeout = errors.New("timeout") + var ErrTxClosed = errors.New("tx closed") + var ErrTxNotWritable = errors.New("tx not writable") + var ErrValueTooLarge = errors.New("value too large") + var ErrVersionMismatch = errors.New("version mismatch") + type Bucket struct + FillPercent float64 + func (b *Bucket) Bucket(name []byte) *Bucket + func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) + func (b *Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) + func (b *Bucket) Cursor() *Cursor + func (b *Bucket) Delete(key []byte) error + func (b *Bucket) DeleteBucket(key []byte) error + func (b *Bucket) ForEach(fn func(k, v []byte) error) error + func (b *Bucket) Get(key []byte) []byte + func (b *Bucket) NextSequence() (uint64, error) + func (b *Bucket) Put(key []byte, value []byte) error + func (b *Bucket) Root() pgid + func (b *Bucket) Stats() BucketStats + func (b *Bucket) Tx() *Tx + func (b *Bucket) Writable() bool + type BucketStats struct + BranchAlloc int + BranchInuse int + BranchOverflowN int + BranchPageN int + BucketN int + Depth int + InlineBucketInuse int + InlineBucketN int + KeyN int + LeafAlloc int + LeafInuse int + LeafOverflowN int + LeafPageN int + func (s *BucketStats) Add(other BucketStats) + type Cursor struct + func (c *Cursor) Bucket() *Bucket + func (c *Cursor) Delete() error + func (c *Cursor) First() (key []byte, value []byte) + func (c *Cursor) Last() (key []byte, value []byte) + func (c *Cursor) Next() (key []byte, value []byte) + func (c *Cursor) Prev() (key []byte, value []byte) + func (c *Cursor) Seek(seek []byte) (key []byte, value []byte) + type DB struct + MaxBatchDelay time.Duration + MaxBatchSize int + NoGrowSync bool + NoSync bool + StrictMode bool + func Open(path string, mode os.FileMode, options *Options) (*DB, error) + func (db *DB) Batch(fn func(*Tx) error) error + func (db *DB) Begin(writable bool) (*Tx, error) + func (db *DB) Close() error + func (db *DB) GoString() string + func (db *DB) Info() *Info + func (db *DB) IsReadOnly() bool + func (db *DB) Path() string + func (db *DB) Stats() Stats + func (db *DB) String() string + func (db *DB) Sync() error + func (db *DB) Update(fn func(*Tx) error) error + func (db *DB) View(fn func(*Tx) error) error + type Info struct + Data uintptr + PageSize int + type Options struct + NoGrowSync bool + ReadOnly bool + Timeout time.Duration + type PageInfo struct + Count int + ID int + OverflowCount int + Type string + type Stats struct + FreeAlloc int + FreePageN int + FreelistInuse int + OpenTxN int + PendingPageN int + TxN int + TxStats TxStats + func (s *Stats) Sub(other *Stats) Stats + type Tx struct + func (tx *Tx) Bucket(name []byte) *Bucket + func (tx *Tx) Check() <-chan error + func (tx *Tx) Commit() error + func (tx *Tx) Copy(w io.Writer) error + func (tx *Tx) CopyFile(path string, mode os.FileMode) error + func (tx *Tx) CreateBucket(name []byte) (*Bucket, error) + func (tx *Tx) CreateBucketIfNotExists(name []byte) (*Bucket, error) + func (tx *Tx) Cursor() *Cursor + func (tx *Tx) DB() *DB + func (tx *Tx) DeleteBucket(name []byte) error + func (tx *Tx) ForEach(fn func(name []byte, b *Bucket) error) error + func (tx *Tx) ID() int + func (tx *Tx) OnCommit(fn func()) + func (tx *Tx) Page(id int) (*PageInfo, error) + func (tx *Tx) Rollback() error + func (tx *Tx) Size() int64 + func (tx *Tx) Stats() TxStats + func (tx *Tx) Writable() bool + func (tx *Tx) WriteTo(w io.Writer) (n int64, err error) + type TxStats struct + CursorCount int + NodeCount int + NodeDeref int + PageAlloc int + PageCount int + Rebalance int + RebalanceTime time.Duration + Spill int + SpillTime time.Duration + Split int + Write int + WriteTime time.Duration + func (s *TxStats) Sub(other *TxStats) TxStats