Documentation ¶
Overview ¶
基于DRH(Deep-Re-Hash)算法的高性能Key-Value嵌入式数据库.
Index ¶
- type BinLog
- type BinLogItem
- type DB
- func (db *DB) Begin(table ...string) *Transaction
- func (db *DB) Close()
- func (db *DB) Get(key []byte) []byte
- func (db *DB) GetFrom(key []byte, name string) []byte
- func (db *DB) Items(max int) map[string][]byte
- func (db *DB) Keys(max int) []string
- func (db *DB) Remove(key []byte) error
- func (db *DB) RemoveFrom(key []byte, name string) error
- func (db *DB) Set(key []byte, value []byte) error
- func (db *DB) SetTo(key []byte, value []byte, name string) error
- func (db *DB) Table(name string) (*Table, error)
- func (db *DB) Values(max int) [][]byte
- type MemTable
- type Table
- func (table *Table) Close()
- func (table *Table) Get(key []byte) []byte
- func (table *Table) Items(max int) map[string][]byte
- func (table *Table) Keys(max int) []string
- func (table *Table) PrintAllFileSpaces()
- func (table *Table) Remove(key []byte) error
- func (table *Table) Set(key []byte, value []byte) error
- func (table *Table) Values(max int) [][]byte
- type Transaction
- func (tx *Transaction) Commit(sync ...bool) error
- func (tx *Transaction) Get(key []byte) []byte
- func (tx *Transaction) GetFrom(key []byte, name string) []byte
- func (tx *Transaction) Remove(key []byte) error
- func (tx *Transaction) RemoveFrom(key []byte, name string) error
- func (tx *Transaction) Rollback()
- func (tx *Transaction) Set(key, value []byte) error
- func (tx *Transaction) SetTo(key, value []byte, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
KV数据库
type MemTable ¶
type MemTable struct {
// contains filtered or unexported fields
}
内存表,保存临时的binlog数据
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
事务操作对象
func (*Transaction) GetFrom ¶
func (tx *Transaction) GetFrom(key []byte, name string) []byte
查询数据(针对数据表)
func (*Transaction) RemoveFrom ¶
func (tx *Transaction) RemoveFrom(key []byte, name string) error
删除数据(针对数据表)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.