Documentation ¶
Index ¶
- type Mapmutation
- func (m *Mapmutation) Append(table string, key []byte, value []byte) error
- func (m *Mapmutation) AppendDup(table string, key []byte, value []byte) error
- func (m *Mapmutation) BatchSize() int
- func (m *Mapmutation) Close()
- func (m *Mapmutation) Commit() error
- func (m *Mapmutation) Delete(table string, k []byte) error
- func (m *Mapmutation) Flush(ctx context.Context, tx kv.RwTx) error
- func (m *Mapmutation) ForAmount(bucket string, prefix []byte, amount uint32, walker func(k, v []byte) error) error
- func (m *Mapmutation) ForEach(bucket string, fromPrefix []byte, walker func(k, v []byte) error) error
- func (m *Mapmutation) ForPrefix(bucket string, prefix []byte, walker func(k, v []byte) error) error
- func (m *Mapmutation) GetOne(table string, key []byte) ([]byte, error)
- func (m *Mapmutation) Has(table string, key []byte) (bool, error)
- func (m *Mapmutation) IncrementSequence(bucket string, amount uint64) (res uint64, err error)
- func (m *Mapmutation) Last(table string) ([]byte, []byte, error)
- func (m *Mapmutation) Put(table string, k, v []byte) error
- func (m *Mapmutation) ReadSequence(bucket string) (res uint64, err error)
- func (m *Mapmutation) Rollback()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mapmutation ¶
type Mapmutation struct {
// contains filtered or unexported fields
}
func NewHashBatch ¶
func NewHashBatch(tx kv.Tx, quit <-chan struct{}, tmpdir string, logger log.Logger) *Mapmutation
NewBatch - starts in-mem batch
Common pattern:
batch := db.NewBatch() defer batch.Close() ... some calculations on `batch` batch.Commit()
func (*Mapmutation) Append ¶
func (m *Mapmutation) Append(table string, key []byte, value []byte) error
func (*Mapmutation) AppendDup ¶
func (m *Mapmutation) AppendDup(table string, key []byte, value []byte) error
func (*Mapmutation) BatchSize ¶
func (m *Mapmutation) BatchSize() int
func (*Mapmutation) Close ¶
func (m *Mapmutation) Close()
func (*Mapmutation) Commit ¶
func (m *Mapmutation) Commit() error
func (*Mapmutation) GetOne ¶
func (m *Mapmutation) GetOne(table string, key []byte) ([]byte, error)
Can only be called from the worker thread
func (*Mapmutation) IncrementSequence ¶
func (m *Mapmutation) IncrementSequence(bucket string, amount uint64) (res uint64, err error)
func (*Mapmutation) Put ¶
func (m *Mapmutation) Put(table string, k, v []byte) error
puts a table key with a value and if the table is not found then it appends a table
func (*Mapmutation) ReadSequence ¶
func (m *Mapmutation) ReadSequence(bucket string) (res uint64, err error)
func (*Mapmutation) Rollback ¶
func (m *Mapmutation) Rollback()
Click to show internal directories.
Click to hide internal directories.