Documentation ¶
Index ¶
- Variables
- func GetNodeCount() int64
- type ByteArray
- type ComparisonFunction
- type DB
- func (db *DB) Close() error
- func (db *DB) Commit(txn *Txn) error
- func (db *DB) CreateIndex(index IndexField) error
- func (db *DB) CreateTable(table string, obj interface{}) error
- func (db *DB) Get(k []byte) (*[]byte, bool)
- func (db *DB) GetInfo() DBInfo
- func (db *DB) GetPath() string
- func (db *DB) GetRootSnapshot() *Snapshot
- func (db *DB) Grow() error
- func (db *DB) HasTable(table string) bool
- func (db *DB) Iter() *Iterator
- func (db *DB) PrintFreeChunks()
- func (db *DB) PrintTree()
- func (db *DB) SetCustomEncoder(encode DBEncoder, decode DBDecoder)
- func (db *DB) SetRootSnapshot(s *Snapshot)
- func (db *DB) Snapshot(id uint64) *Snapshot
- type DBDecoder
- type DBEncoder
- type DBInfo
- type IndexField
- type Iterator
- type Node
- type Options
- type OrderCondition
- type OrderField
- type Ptr
- type RefCounted
- type RefCountedObject
- type ResultIterator
- type Snapshot
- func (s *Snapshot) CreateIndex(index IndexField) error
- func (s *Snapshot) CreateTable(table string, obj interface{}) error
- func (s *Snapshot) Delete(k []byte) bool
- func (s *Snapshot) DeleteObj(table string, id interface{}) error
- func (s *Snapshot) Get(k []byte) (*[]byte, bool)
- func (s *Snapshot) GetFreeMemory() uint64
- func (s *Snapshot) GetId() uint64
- func (s *Snapshot) GetObjAllocated() int64
- func (s *Snapshot) GetUsedMemory() uint64
- func (s *Snapshot) HasTable(table string) bool
- func (s *Snapshot) Insert(k, v []byte) (*[]byte, bool)
- func (s *Snapshot) InsertObj(table string, obj interface{}) error
- func (s *Snapshot) InsertWithNode(k, v []byte, vp Ptr) (*[]byte, bool)
- func (s *Snapshot) Iter() *Iterator
- func (s *Snapshot) OrderParser(input []byte) (*OrderField, error)
- func (s *Snapshot) PrintTree()
- func (s *Snapshot) Release()
- func (s *Snapshot) ResetObjAllocated()
- func (s *Snapshot) ResetTo(to *Snapshot)
- func (s *Snapshot) Root() *Ptr
- func (s *Snapshot) RootNode() *Node
- func (s *Snapshot) Select(table string, args ...interface{}) (*ResultIterator, error)
- func (s *Snapshot) Snapshot() *Snapshot
- func (s *Snapshot) WhereParser(input []byte) (*WhereField, error)
- type Table
- type Tokenizer
- type Txn
- type WhereCondition
- type WhereField
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailedToCreateDB = errors.New("Failed to create database") ErrDirtyDB = errors.New("Dirty database found") )
View Source
var DefaultOptions = &Options{ ReadOnly: false, }
DefaultOptions for the DB
View Source
var (
ErrInvalidSize = errors.New("Input data size is invalid")
)
Functions ¶
func GetNodeCount ¶
func GetNodeCount() int64
Types ¶
type ByteArray ¶
func (*ByteArray) Release ¶
func (b *ByteArray) Release(mm balloc.MemoryManager)
func (*ByteArray) Retain ¶
func (b *ByteArray) Retain(mm balloc.MemoryManager)
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func OpenInMemory ¶
func (*DB) CreateIndex ¶
func (db *DB) CreateIndex(index IndexField) error
func (*DB) CreateTable ¶
func (*DB) GetRootSnapshot ¶
func (*DB) PrintFreeChunks ¶
func (db *DB) PrintFreeChunks()
func (*DB) SetCustomEncoder ¶
func (*DB) SetRootSnapshot ¶
type IndexField ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func (*Iterator) SeekPrefix ¶
type Node ¶
type Node struct { RefCountedObject // contains filtered or unexported fields }
type OrderField ¶
type OrderField struct { Field string Order OrderCondition }
type Ptr ¶
type Ptr uint64
func (*Ptr) NodeRelease ¶
func (nPtr *Ptr) NodeRelease(mm balloc.MemoryManager) bool
func (*Ptr) NodeRetain ¶
func (p *Ptr) NodeRetain(mm balloc.MemoryManager) bool
type RefCounted ¶
type RefCountedObject ¶
type RefCountedObject struct {
// contains filtered or unexported fields
}
func (*RefCountedObject) Retain ¶
func (p *RefCountedObject) Retain()
type ResultIterator ¶
type ResultIterator struct {
// contains filtered or unexported fields
}
func (*ResultIterator) Next ¶
func (ri *ResultIterator) Next(val interface{}) bool
func (*ResultIterator) Release ¶
func (ri *ResultIterator) Release()
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
func (*Snapshot) CreateIndex ¶
func (s *Snapshot) CreateIndex(index IndexField) error
func (*Snapshot) CreateTable ¶
func (*Snapshot) GetFreeMemory ¶
func (*Snapshot) GetObjAllocated ¶
func (*Snapshot) GetUsedMemory ¶
func (*Snapshot) InsertWithNode ¶
func (*Snapshot) OrderParser ¶
func (s *Snapshot) OrderParser(input []byte) (*OrderField, error)
func (*Snapshot) ResetObjAllocated ¶
func (s *Snapshot) ResetObjAllocated()
func (*Snapshot) Select ¶
func (s *Snapshot) Select(table string, args ...interface{}) (*ResultIterator, error)
func (*Snapshot) WhereParser ¶
func (s *Snapshot) WhereParser(input []byte) (*WhereField, error)
type WhereCondition ¶
type WhereCondition int
const ( Equal WhereCondition = iota NotEqual Smaller SmallerOrEqual Larger LargerOrEqual Like )
type WhereField ¶
type WhereField struct { Field string Condition WhereCondition Value []byte }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.