Documentation ¶
Index ¶
- type MemoryDiff
- type MemoryMutation
- func (m *MemoryMutation) Append(table string, key []byte, value []byte) error
- func (m *MemoryMutation) AppendDup(table string, key []byte, value []byte) error
- func (m *MemoryMutation) BucketSize(bucket string) (uint64, error)
- func (m *MemoryMutation) CHandle() unsafe.Pointer
- func (m *MemoryMutation) ClearBucket(bucket string) error
- func (m *MemoryMutation) Close()
- func (m *MemoryMutation) CollectMetrics()
- func (m *MemoryMutation) Commit() error
- func (m *MemoryMutation) CreateBucket(bucket string) error
- func (m *MemoryMutation) Cursor(bucket string) (kv.Cursor, error)
- func (m *MemoryMutation) CursorDupSort(bucket string) (kv.CursorDupSort, error)
- func (m *MemoryMutation) DBSize() (uint64, error)
- func (m *MemoryMutation) Delete(table string, k []byte) error
- func (m *MemoryMutation) Diff() (*MemoryDiff, error)
- func (m *MemoryMutation) DropBucket(bucket string) error
- func (m *MemoryMutation) ExistsBucket(bucket string) (bool, error)
- func (m *MemoryMutation) Flush(tx kv.RwTx) error
- func (m *MemoryMutation) ForAmount(bucket string, prefix []byte, amount uint32, walker func(k, v []byte) error) error
- func (m *MemoryMutation) ForEach(bucket string, fromPrefix []byte, walker func(k, v []byte) error) error
- func (m *MemoryMutation) ForPrefix(bucket string, prefix []byte, walker func(k, v []byte) error) error
- func (m *MemoryMutation) GetOne(table string, key []byte) ([]byte, error)
- func (m *MemoryMutation) Has(table string, key []byte) (bool, error)
- func (m *MemoryMutation) IncrementSequence(bucket string, amount uint64) (uint64, error)
- func (m *MemoryMutation) Last(table string) ([]byte, []byte, error)
- func (m *MemoryMutation) ListBuckets() ([]string, error)
- func (m *MemoryMutation) MemDB() kv.RwDB
- func (m *MemoryMutation) MemTx() kv.RwTx
- func (m *MemoryMutation) Prefix(table string, prefix []byte) (iter.KV, error)
- func (m *MemoryMutation) Put(table string, k, v []byte) error
- func (m *MemoryMutation) Range(table string, fromPrefix, toPrefix []byte) (iter.KV, error)
- func (m *MemoryMutation) RangeAscend(table string, fromPrefix, toPrefix []byte, limit int) (iter.KV, error)
- func (m *MemoryMutation) RangeDescend(table string, fromPrefix, toPrefix []byte, limit int) (iter.KV, error)
- func (m *MemoryMutation) RangeDupSort(table string, key []byte, fromPrefix, toPrefix []byte, asc order.By, limit int) (iter.KV, error)
- func (m *MemoryMutation) ReadSequence(bucket string) (uint64, error)
- func (m *MemoryMutation) Rollback()
- func (m *MemoryMutation) RwCursor(bucket string) (kv.RwCursor, error)
- func (m *MemoryMutation) RwCursorDupSort(bucket string) (kv.RwCursorDupSort, error)
- func (m *MemoryMutation) Stream(table string, fromPrefix, toPrefix []byte) (iter.KV, error)
- func (m *MemoryMutation) StreamAscend(table string, fromPrefix, toPrefix []byte, limit int) (iter.KV, error)
- func (m *MemoryMutation) StreamDescend(table string, fromPrefix, toPrefix []byte, limit int) (iter.KV, error)
- func (m *MemoryMutation) UpdateTxn(tx kv.Tx)
- func (m *MemoryMutation) ViewID() uint64
- type NextType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryDiff ¶
type MemoryDiff struct {
// contains filtered or unexported fields
}
type MemoryMutation ¶
type MemoryMutation struct {
// contains filtered or unexported fields
}
func NewMemoryBatch ¶
func NewMemoryBatch(tx kv.Tx, tmpDir string) *MemoryMutation
NewMemoryBatch - starts in-mem batch
Common pattern:
batch := NewMemoryBatch(db, tmpDir) defer batch.Close() ... some calculations on `batch` batch.Commit()
func (*MemoryMutation) Append ¶
func (m *MemoryMutation) Append(table string, key []byte, value []byte) error
func (*MemoryMutation) AppendDup ¶
func (m *MemoryMutation) AppendDup(table string, key []byte, value []byte) error
func (*MemoryMutation) BucketSize ¶
func (m *MemoryMutation) BucketSize(bucket string) (uint64, error)
func (*MemoryMutation) CHandle ¶
func (m *MemoryMutation) CHandle() unsafe.Pointer
func (*MemoryMutation) ClearBucket ¶
func (m *MemoryMutation) ClearBucket(bucket string) error
func (*MemoryMutation) Close ¶
func (m *MemoryMutation) Close()
func (*MemoryMutation) CollectMetrics ¶
func (m *MemoryMutation) CollectMetrics()
func (*MemoryMutation) Commit ¶
func (m *MemoryMutation) Commit() error
func (*MemoryMutation) CreateBucket ¶
func (m *MemoryMutation) CreateBucket(bucket string) error
func (*MemoryMutation) Cursor ¶
func (m *MemoryMutation) Cursor(bucket string) (kv.Cursor, error)
Cursor creates a new cursor (the real fun begins here)
func (*MemoryMutation) CursorDupSort ¶
func (m *MemoryMutation) CursorDupSort(bucket string) (kv.CursorDupSort, error)
Cursor creates a new cursor (the real fun begins here)
func (*MemoryMutation) DBSize ¶
func (m *MemoryMutation) DBSize() (uint64, error)
func (*MemoryMutation) Diff ¶
func (m *MemoryMutation) Diff() (*MemoryDiff, error)
func (*MemoryMutation) DropBucket ¶
func (m *MemoryMutation) DropBucket(bucket string) error
func (*MemoryMutation) ExistsBucket ¶
func (m *MemoryMutation) ExistsBucket(bucket string) (bool, error)
func (*MemoryMutation) GetOne ¶
func (m *MemoryMutation) GetOne(table string, key []byte) ([]byte, error)
Can only be called from the worker thread
func (*MemoryMutation) Has ¶
func (m *MemoryMutation) Has(table string, key []byte) (bool, error)
Has return whether a key is present in a certain table.
func (*MemoryMutation) IncrementSequence ¶
func (m *MemoryMutation) IncrementSequence(bucket string, amount uint64) (uint64, error)
func (*MemoryMutation) ListBuckets ¶
func (m *MemoryMutation) ListBuckets() ([]string, error)
func (*MemoryMutation) MemDB ¶
func (m *MemoryMutation) MemDB() kv.RwDB
func (*MemoryMutation) MemTx ¶
func (m *MemoryMutation) MemTx() kv.RwTx
func (*MemoryMutation) RangeAscend ¶
func (*MemoryMutation) RangeDescend ¶
func (*MemoryMutation) RangeDupSort ¶
func (*MemoryMutation) ReadSequence ¶
func (m *MemoryMutation) ReadSequence(bucket string) (uint64, error)
func (*MemoryMutation) Rollback ¶
func (m *MemoryMutation) Rollback()
func (*MemoryMutation) RwCursor ¶
func (m *MemoryMutation) RwCursor(bucket string) (kv.RwCursor, error)
Cursor creates a new cursor (the real fun begins here)
func (*MemoryMutation) RwCursorDupSort ¶
func (m *MemoryMutation) RwCursorDupSort(bucket string) (kv.RwCursorDupSort, error)
Cursor creates a new cursor (the real fun begins here)
func (*MemoryMutation) StreamAscend ¶
func (*MemoryMutation) StreamDescend ¶
func (*MemoryMutation) UpdateTxn ¶
func (m *MemoryMutation) UpdateTxn(tx kv.Tx)
func (*MemoryMutation) ViewID ¶
func (m *MemoryMutation) ViewID() uint64
Click to show internal directories.
Click to hide internal directories.