batch

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TXList

type TXList struct {
	Manager *database.Manager
	List    []storage.TX
}

func (*TXList) Begin

func (b *TXList) Begin(manager *database.Manager)

Begin Begin a Transaction List

func (*TXList) End

func (b *TXList) End() (err error)

End Write all the transactions in a given batch of pending transactions. The batch is emptied, so it can be reused.

func (*TXList) Put

func (b *TXList) Put(key [storage.KeyLength]byte, value []byte) error

PutBatch Put a key value pair into a batch. These commits are effectively pending and will only be written to the database if the batch is passed to PutBatch

Jump to

Keyboard shortcuts

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