Versions in this module Expand all Collapse all v1 v1.3.0-alpha.2 Jun 21, 2016 v1.3.0-alpha.1 May 25, 2016 v1.3.0-alpha.0 Apr 25, 2016 v1.2.2 Oct 18, 2016 v1.2.1 Jul 14, 2016 v1.2.0 May 25, 2016 v1.2.0-rc2 Apr 23, 2016 v1.2.0-rc1 Apr 21, 2016 v1.1.6 Apr 5, 2016 v1.1.5 Mar 29, 2016 v1.1.4 Mar 14, 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.3 Feb 17, 2016 Changes in this version + var ErrDatabaseReadOnly = errors.New("database is in read-only mode") type DB + NoGrowSync bool + func (db *DB) IsReadOnly() bool + func (db *DB) Sync() error type Options + NoGrowSync bool + ReadOnly bool v1.1.2 Feb 6, 2016 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 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 + 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) Path() string + func (db *DB) Stats() Stats + func (db *DB) String() string + 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 + 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