Documentation ¶
Index ¶
- Variables
- func BytesToFloat64(data []byte) float64
- func BytesToInt64(data []byte) int64
- func BytesToString(b []byte) string
- func BytesToUint64(data []byte) uint64
- func Float64ToBytes(n float64) []byte
- func Int64ToBytes(n int64) []byte
- func StrToBytes(s string) []byte
- func Uint64ToBytes(n uint64) []byte
- type Compton
- type Cursor
- type Database
- type ListOptions
- type Merger
- type Options
- type Table
- func (table *Table) Close() error
- func (table *Table) DeleteMeta(key []byte) error
- func (table *Table) DeleteRecord(key []byte) error
- func (table *Table) Drop() error
- func (table *Table) Get(key []byte) ([]byte, error)
- func (table *Table) GetMetaBytes(key []byte) ([]byte, error)
- func (table *Table) GetMetaFloat64(key []byte) (float64, error)
- func (table *Table) GetMetaInt64(key []byte) (int64, error)
- func (table *Table) GetMetaString(key []byte) (string, error)
- func (table *Table) GetMetaUint64(key []byte) (uint64, error)
- func (table *Table) GetRecord(pkey []byte) (*record_type.Record, error)
- func (table *Table) ListMeta(key []byte) (*Cursor, error)
- func (table *Table) ListRecords(targetPrimaryKey []byte, opts *ListOptions) (*Cursor, error)
- func (table *Table) ModifyRecord(pkey []byte, newRecord *record_type.Record) error
- func (table *Table) Open() error
- func (table *Table) SetMetaBytes(key []byte, value []byte) error
- func (table *Table) SetMetaFloat64(key []byte, value float64) error
- func (table *Table) SetMetaInt64(key []byte, value int64) error
- func (table *Table) SetMetaString(key []byte, value string) error
- func (table *Table) SetMetaUint64(key []byte, value uint64) error
- func (table *Table) Write(key []byte, data []byte) error
- func (table *Table) WriteRecord(pkey []byte, r *record_type.Record) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDatabaseExistsAlready = errors.New("Database exists already") ErrNotFoundDatabase = errors.New("Not found database") )
View Source
var ( ErrNotFoundRecord = errors.New("Not found record") ErrNotFoundEntry = errors.New("Not found entry") )
View Source
var ( MetaDataKeyPrefix = []byte("m_") RecordKeyPrefix = []byte("r_") )
View Source
var (
ErrNotFoundTable = errors.New("Not found table")
)
Functions ¶
func BytesToFloat64 ¶
func BytesToInt64 ¶
func BytesToString ¶
func BytesToUint64 ¶
func Float64ToBytes ¶
func Int64ToBytes ¶
func StrToBytes ¶
func Uint64ToBytes ¶
Types ¶
type Compton ¶
type Compton struct {
// contains filtered or unexported fields
}
func NewCompton ¶
func (*Compton) CreateDatabase ¶
func (*Compton) DropDatabase ¶
type Cursor ¶
type Cursor struct {
// contains filtered or unexported fields
}
func (*Cursor) GetRecord ¶
func (cur *Cursor) GetRecord() *record_type.Record
type ListOptions ¶
type Merger ¶
type Merger struct {
// contains filtered or unexported fields
}
func (*Merger) MergeNewer ¶
func (*Merger) MergeOlder ¶
type Options ¶
type Options struct {
DatabasePath string
}
func NewOptions ¶
func NewOptions() *Options
type Table ¶
type Table struct { Database *Database Db *pebble.DB Path string Name string Merge func([]byte, []byte) []byte // contains filtered or unexported fields }
func (*Table) DeleteMeta ¶
func (*Table) DeleteRecord ¶
func (*Table) ListRecords ¶
func (table *Table) ListRecords(targetPrimaryKey []byte, opts *ListOptions) (*Cursor, error)
func (*Table) ModifyRecord ¶
func (table *Table) ModifyRecord(pkey []byte, newRecord *record_type.Record) error
func (*Table) WriteRecord ¶
func (table *Table) WriteRecord(pkey []byte, r *record_type.Record) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.