transactions

package
v0.0.0-...-a414206 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FLAG_DELETED = byte(1)
	FLAG_UPDATED = byte(2)
)

Variables

View Source
var ErrorConflict = errors.New("cannot commit due to conflict")

Functions

This section is empty.

Types

type CombinedIterator

type CombinedIterator struct {
	// contains filtered or unexported fields
}

combines pending updates and the snapshot

func (*CombinedIterator) Deref

func (iter *CombinedIterator) Deref() ([]byte, []byte)

func (*CombinedIterator) Next

func (iter *CombinedIterator) Next()

func (*CombinedIterator) Valid

func (iter *CombinedIterator) Valid() bool

type KVIter

type KVIter interface {
	Deref() (key []byte, val []byte)
	Valid() bool
	Next()
}

KV interfaces

type KVTX

type KVTX struct {
	// contains filtered or unexported fields
}

func (*KVTX) Del

func (tx *KVTX) Del(req *DeleteReq) (bool, error)

func (*KVTX) Get

func (tx *KVTX) Get(key []byte) ([]byte, bool)

point query combines captured updates with snapshots

func (*KVTX) Revert

func (tx *KVTX) Revert(save *TXSave)

func (*KVTX) Save

func (tx *KVTX) Save(save *TXSave)

func (*KVTX) Seek

func (tx *KVTX) Seek(key1 []byte, cmp1 int, key2 []byte, cmp2 int) KVIter

range query combines captured updates with snapshots

func (*KVTX) Set

func (tx *KVTX) Set(key []byte, val []byte) (bool, error)

func (*KVTX) Update

func (tx *KVTX) Update(req *UpdateReq) (bool, error)

type KVWrap

type KVWrap struct {
	*kv.KV
}

func (KVWrap) Abort

func (kv KVWrap) Abort(tx *KVTX)

end transaction

type KeyRange

type KeyRange struct {
	// contains filtered or unexported fields
}

start <=key <=stop

type TXSave

type TXSave struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL