Documentation
¶
Overview ¶
Package fastdb holds all the fastdb functionalities.
Index ¶
- type DB
- func (fdb *DB) BucketInfo(bucket string) int
- func (fdb *DB) Close() error
- func (fdb *DB) Defrag() error
- func (fdb *DB) Del(bucket string, key int) (bool, error)
- func (fdb *DB) Get(bucket string, key int) ([]byte, bool)
- func (fdb *DB) GetAll(bucket string) (map[int][]byte, error)
- func (fdb *DB) GetAllSorted(bucket string) ([]SortRecord, error)
- func (fdb *DB) GetNewIndex(bucket string) (int, error)
- func (fdb *DB) Info() string
- func (fdb *DB) Set(bucket string, key int, value []byte) error
- type SortRecord
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
}
DB represents a collection of key-value pairs that persist on disk or memory.
func Open ¶
Open opens a database at the provided path. If the file doesn't exist, it will be created automatically. If the path is ':memory:' then the database will be opened in memory only.
func (*DB) BucketInfo ¶
BucketInfo returns number of records in a bucket.
func (*DB) GetAllSorted ¶
func (fdb *DB) GetAllSorted(bucket string) ([]SortRecord, error)
GetAllSorted returns all map values from a bucket in Key sorted order.
func (*DB) GetNewIndex ¶
GetNewIndex returns the next available index for a bucket.
type SortRecord ¶
SortRecord represents a record from a sorted collection of sliced records
Click to show internal directories.
Click to hide internal directories.