Documentation ¶
Index ¶
- Constants
- type BlockTable
- func (self *BlockTable) Get(key bs.ByteSlice) (value bs.ByteSlice, err error)
- func (self *BlockTable) Has(key bs.ByteSlice) bool
- func (self *BlockTable) Key() int64
- func (self *BlockTable) Put(key, value bs.ByteSlice) (err error)
- func (self *BlockTable) RecordsPerBlock() int
- func (self *BlockTable) Remove(key bs.ByteSlice) (err error)
- type BytesStore
- func (self *BytesStore) Get(bytes bs.ByteSlice) (key, value bs.ByteSlice, err error)
- func (self *BytesStore) Put(key, value bs.ByteSlice) (bytes bs.ByteSlice, err error)
- func (self *BytesStore) Remove(bytes bs.ByteSlice) (err error)
- func (self *BytesStore) Size() uint8
- func (self *BytesStore) Update(bytes, key, value bs.ByteSlice) (rbytes bs.ByteSlice, err error)
- type HashBucket
- func (self *HashBucket) Get(hash, key bs.ByteSlice) (value bs.ByteSlice, err error)
- func (self *HashBucket) Has(hash, key bs.ByteSlice) bool
- func (self *HashBucket) Key() int64
- func (self *HashBucket) Keys() (keys []bs.ByteSlice)
- func (self *HashBucket) PrintBucket()
- func (self *HashBucket) Put(hash, key, value bs.ByteSlice) (updated bool, err error)
- func (self *HashBucket) Remove(hash, key bs.ByteSlice) (err error)
- func (self *HashBucket) Split(stay func(key bs.ByteSlice) bool) (other *HashBucket, err error)
- type KVStore
- type VarcharStore
- func (self *VarcharStore) Get(bytes bs.ByteSlice) (key, value bs.ByteSlice, err error)
- func (self *VarcharStore) Put(key, value bs.ByteSlice) (bytes bs.ByteSlice, err error)
- func (self *VarcharStore) Remove(bytes bs.ByteSlice) (err error)
- func (self *VarcharStore) Size() uint8
- func (self *VarcharStore) Update(bytes, key, value bs.ByteSlice) (rbytes bs.ByteSlice, err error)
Constants ¶
View Source
const HEADER_SIZE = 18
View Source
const MAX_BYTES_STORE_SIZE = 255 - 2
View Source
const (
OVERFLOW = 1 << iota
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockTable ¶
type BlockTable struct {
// contains filtered or unexported fields
}
func NewBlockTable ¶
func NewBlockTable(file file.BlockDevice, keysize, valsize uint8) (*BlockTable, error)
func ReadBlockTable ¶
func ReadBlockTable(file file.BlockDevice, key int64) (self *BlockTable, err error)
func (*BlockTable) Key ¶
func (self *BlockTable) Key() int64
func (*BlockTable) RecordsPerBlock ¶
func (self *BlockTable) RecordsPerBlock() int
type BytesStore ¶
type BytesStore struct {
// contains filtered or unexported fields
}
func NewBytesStore ¶
func NewBytesStore(keysize, valsize uint8) (*BytesStore, error)
func (*BytesStore) Size ¶
func (self *BytesStore) Size() uint8
type HashBucket ¶
type HashBucket struct {
// contains filtered or unexported fields
}
func NewHashBucket ¶
func NewHashBucket(file file.BlockDevice, hashsize uint8, kv KVStore) (self *HashBucket, err error)
func ReadHashBucket ¶
func ReadHashBucket(file file.BlockDevice, key int64, kv KVStore) (self *HashBucket, err error)
func (*HashBucket) Key ¶
func (self *HashBucket) Key() int64
func (*HashBucket) Keys ¶
func (self *HashBucket) Keys() (keys []bs.ByteSlice)
func (*HashBucket) PrintBucket ¶
func (self *HashBucket) PrintBucket()
func (*HashBucket) Put ¶
func (self *HashBucket) Put(hash, key, value bs.ByteSlice) (updated bool, err error)
func (*HashBucket) Split ¶
func (self *HashBucket) Split(stay func(key bs.ByteSlice) bool) (other *HashBucket, err error)
type VarcharStore ¶
type VarcharStore struct {
// contains filtered or unexported fields
}
func NewVarcharStore ¶
func NewVarcharStore(file file.BlockDevice) (*VarcharStore, error)
func (*VarcharStore) Size ¶
func (self *VarcharStore) Size() uint8
Click to show internal directories.
Click to hide internal directories.