Documentation ¶
Index ¶
- Constants
- func Repair(cfg *config.Config) error
- type DB
- func (db *DB) Begin() (*Tx, error)
- func (db *DB) NewIterator() *Iterator
- func (db *DB) NewSnapshot() (*Snapshot, error)
- func (db *DB) NewWriteBatch() WriteBatch
- func (db *DB) RangeIterator(min []byte, max []byte, rangeType uint8) *RangeLimitIterator
- func (db *DB) RangeLimitIterator(min []byte, max []byte, rangeType uint8, offset int, count int) *RangeLimitIterator
- func (db *DB) RevRangeIterator(min []byte, max []byte, rangeType uint8) *RangeLimitIterator
- func (db *DB) RevRangeLimitIterator(min []byte, max []byte, rangeType uint8, offset int, count int) *RangeLimitIterator
- type Iterator
- func (it *Iterator) BufKey(b []byte) []byte
- func (it *Iterator) BufValue(b []byte) []byte
- func (it *Iterator) Close()
- func (it *Iterator) Find(key []byte) []byte
- func (it *Iterator) Key() []byte
- func (it *Iterator) Next()
- func (it *Iterator) Prev()
- func (it *Iterator) RawFind(key []byte) []byte
- func (it *Iterator) RawKey() []byte
- func (it *Iterator) RawValue() []byte
- func (it *Iterator) Seek(key []byte)
- func (it *Iterator) SeekToFirst()
- func (it *Iterator) SeekToLast()
- func (it *Iterator) Valid() bool
- func (it *Iterator) Value() []byte
- type Limit
- type Range
- type RangeLimitIterator
- func (it *RangeLimitIterator) BufKey(b []byte) []byte
- func (it *RangeLimitIterator) BufValue(b []byte) []byte
- func (it *RangeLimitIterator) Close()
- func (it *RangeLimitIterator) Key() []byte
- func (it *RangeLimitIterator) Next()
- func (it *RangeLimitIterator) RawKey() []byte
- func (it *RangeLimitIterator) RawValue() []byte
- func (it *RangeLimitIterator) Valid() bool
- func (it *RangeLimitIterator) Value() []byte
- type Snapshot
- type Tx
- func (tx *Tx) NewIterator() *Iterator
- func (tx *Tx) NewWriteBatch() WriteBatch
- func (tx *Tx) RangeIterator(min []byte, max []byte, rangeType uint8) *RangeLimitIterator
- func (tx *Tx) RangeLimitIterator(min []byte, max []byte, rangeType uint8, offset int, count int) *RangeLimitIterator
- func (tx *Tx) RevRangeIterator(min []byte, max []byte, rangeType uint8) *RangeLimitIterator
- func (tx *Tx) RevRangeLimitIterator(min []byte, max []byte, rangeType uint8, offset int, count int) *RangeLimitIterator
- type WriteBatch
Constants ¶
View Source
const ( IteratorForward uint8 = 0 IteratorBackward uint8 = 1 )
View Source
const ( RangeClose uint8 = 0x00 RangeLOpen uint8 = 0x01 RangeROpen uint8 = 0x10 RangeOpen uint8 = 0x11 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
func (*DB) NewIterator ¶
func (*DB) NewSnapshot ¶
func (*DB) NewWriteBatch ¶
func (db *DB) NewWriteBatch() WriteBatch
func (*DB) RangeIterator ¶
func (db *DB) RangeIterator(min []byte, max []byte, rangeType uint8) *RangeLimitIterator
func (*DB) RangeLimitIterator ¶
func (db *DB) RangeLimitIterator(min []byte, max []byte, rangeType uint8, offset int, count int) *RangeLimitIterator
count < 0, unlimit.
offset must >= 0, if < 0, will get nothing.
func (*DB) RevRangeIterator ¶
func (db *DB) RevRangeIterator(min []byte, max []byte, rangeType uint8) *RangeLimitIterator
func (*DB) RevRangeLimitIterator ¶
func (db *DB) RevRangeLimitIterator(min []byte, max []byte, rangeType uint8, offset int, count int) *RangeLimitIterator
count < 0, unlimit.
offset must >= 0, if < 0, will get nothing.
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func (*Iterator) RawFind ¶
Finds by key, if not found, nil returns, else a reference of value returns. you must be careful that it will be changed after next iterate.
func (*Iterator) RawKey ¶
Returns a reference of key. you must be careful that it will be changed after next iterate.
func (*Iterator) RawValue ¶
Returns a reference of value. you must be careful that it will be changed after next iterate.
func (*Iterator) SeekToFirst ¶
func (it *Iterator) SeekToFirst()
func (*Iterator) SeekToLast ¶
func (it *Iterator) SeekToLast()
type Range ¶
min must less or equal than max
range type:
close: [min, max] open: (min, max) lopen: (min, max] ropen: [min, max)
type RangeLimitIterator ¶
type RangeLimitIterator struct {
// contains filtered or unexported fields
}
func NewRangeIterator ¶
func NewRangeIterator(i *Iterator, r *Range) *RangeLimitIterator
func NewRangeLimitIterator ¶
func NewRangeLimitIterator(i *Iterator, r *Range, l *Limit) *RangeLimitIterator
func NewRevRangeIterator ¶
func NewRevRangeIterator(i *Iterator, r *Range) *RangeLimitIterator
func NewRevRangeLimitIterator ¶
func NewRevRangeLimitIterator(i *Iterator, r *Range, l *Limit) *RangeLimitIterator
func (*RangeLimitIterator) BufKey ¶
func (it *RangeLimitIterator) BufKey(b []byte) []byte
func (*RangeLimitIterator) BufValue ¶
func (it *RangeLimitIterator) BufValue(b []byte) []byte
func (*RangeLimitIterator) Close ¶
func (it *RangeLimitIterator) Close()
func (*RangeLimitIterator) Key ¶
func (it *RangeLimitIterator) Key() []byte
func (*RangeLimitIterator) Next ¶
func (it *RangeLimitIterator) Next()
func (*RangeLimitIterator) RawKey ¶
func (it *RangeLimitIterator) RawKey() []byte
func (*RangeLimitIterator) RawValue ¶
func (it *RangeLimitIterator) RawValue() []byte
func (*RangeLimitIterator) Valid ¶
func (it *RangeLimitIterator) Valid() bool
func (*RangeLimitIterator) Value ¶
func (it *RangeLimitIterator) Value() []byte
type Snapshot ¶
func (*Snapshot) NewIterator ¶
type Tx ¶
func (*Tx) NewIterator ¶
func (*Tx) NewWriteBatch ¶
func (tx *Tx) NewWriteBatch() WriteBatch
func (*Tx) RangeIterator ¶
func (tx *Tx) RangeIterator(min []byte, max []byte, rangeType uint8) *RangeLimitIterator
func (*Tx) RangeLimitIterator ¶
func (tx *Tx) RangeLimitIterator(min []byte, max []byte, rangeType uint8, offset int, count int) *RangeLimitIterator
count < 0, unlimit.
offset must >= 0, if < 0, will get nothing.
func (*Tx) RevRangeIterator ¶
func (tx *Tx) RevRangeIterator(min []byte, max []byte, rangeType uint8) *RangeLimitIterator
func (*Tx) RevRangeLimitIterator ¶
func (tx *Tx) RevRangeLimitIterator(min []byte, max []byte, rangeType uint8, offset int, count int) *RangeLimitIterator
count < 0, unlimit.
offset must >= 0, if < 0, will get nothing.
type WriteBatch ¶
type WriteBatch interface { driver.IWriteBatch }
Click to show internal directories.
Click to hide internal directories.