Documentation
¶
Index ¶
- Constants
- Variables
- type DB
- type DBTX
- func (tx *DBTX) Delete(table string, rec Record) (bool, error)
- func (tx *DBTX) Get(table string, rec *Record) (bool, error)
- func (tx *DBTX) Insert(table string, rec Record) (bool, error)
- func (tx *DBTX) Revert(save *transactions.TXSave)
- func (tx *DBTX) Save(save *transactions.TXSave)
- func (tx *DBTX) Scan(table string, req *Scanner) error
- func (tx *DBTX) Set(table string, dbreq *DBUpdateReq) (bool, error)
- func (tx *DBTX) TableNew(tdef *TableDef) error
- func (tx *DBTX) Update(table string, rec Record) (bool, error)
- func (tx *DBTX) Upsert(table string, rec Record) (bool, error)
- type DBUpdateReq
- type Record
- type Scanner
- type TableDef
- type Value
Constants ¶
View Source
const ( TYPE_ERROR = 0 TYPE_BYTES = 1 TYPE_INT64 = 2 TYPE_INF = 0xff )
View Source
const ( INDEX_ADD = 1 INDEX_DEL = 2 )
View Source
const TABLE_PREFIX_MIN = 100
Variables ¶
View Source
var INTERNAL_TABLES map[string]*TableDef = map[string]*TableDef{ "@meta": TDEF_META, "@table": TDEF_TABLE, }
View Source
var TDEF_META = &TableDef{ Name: "@meta", Types: []uint32{TYPE_BYTES, TYPE_BYTES}, Cols: []string{"key", "val"}, Prefixes: []uint32{1}, Indexes: [][]string{{"key"}}, }
INTERNAL TABLES store metadata
View Source
var TDEF_TABLE = &TableDef{ Name: "@table", Types: []uint32{TYPE_BYTES, TYPE_BYTES}, Cols: []string{"name", "def"}, Prefixes: []uint32{2}, Indexes: [][]string{{"name"}}, }
store table schemas
Functions ¶
This section is empty.
Types ¶
type DBTX ¶
type DBTX struct {
// contains filtered or unexported fields
}
func (*DBTX) Revert ¶
func (tx *DBTX) Revert(save *transactions.TXSave)
func (*DBTX) Save ¶
func (tx *DBTX) Save(save *transactions.TXSave)
type Scanner ¶
type Scanner struct {
Cmp1 int
Cmp2 int
// range from Key 1 to key2
Key1 Record
Key2 Record
// contains filtered or unexported fields
}
scanner decodes KV's into rows iterator for range queries Scanner is a wrapper for B+ Tree iterator
Click to show internal directories.
Click to hide internal directories.