safe_batch

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSafeBatchDB

func NewSafeBatchDB(db tmdb.DB) tmdb.DB

func NewSafeBatchNullify

func NewSafeBatchNullify(batch tmdb.Batch) tmdb.Batch

Types

type SafeBatchDB

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

func (*SafeBatchDB) Close

func (s *SafeBatchDB) Close() error

func (*SafeBatchDB) Delete

func (s *SafeBatchDB) Delete(key []byte) error

func (*SafeBatchDB) DeleteSync

func (s *SafeBatchDB) DeleteSync(key []byte) error

func (*SafeBatchDB) Flush

func (s *SafeBatchDB) Flush() (tmdb.Batch, error)

flush batch and return rollback batch if rollbackable

func (*SafeBatchDB) Get

func (s *SafeBatchDB) Get(bytes []byte) ([]byte, error)

func (*SafeBatchDB) Has

func (s *SafeBatchDB) Has(key []byte) (bool, error)

func (*SafeBatchDB) Iterator

func (s *SafeBatchDB) Iterator(start, end []byte) (tmdb.Iterator, error)

func (*SafeBatchDB) NewBatch

func (s *SafeBatchDB) NewBatch() tmdb.Batch

func (*SafeBatchDB) Open

func (s *SafeBatchDB) Open()

open batch

func (*SafeBatchDB) Print

func (s *SafeBatchDB) Print() error

func (*SafeBatchDB) ReverseIterator

func (s *SafeBatchDB) ReverseIterator(start, end []byte) (tmdb.Iterator, error)

func (*SafeBatchDB) Set

func (s *SafeBatchDB) Set(key, value []byte) error

func (*SafeBatchDB) SetSync

func (s *SafeBatchDB) SetSync(key, value []byte) error

func (*SafeBatchDB) Stats

func (s *SafeBatchDB) Stats() map[string]string

type SafeBatchDBCloser

type SafeBatchDBCloser interface {
	tmdb.DB
	Open()
	Flush() (tmdb.Batch, error)
}

type SafeBatchNullified

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

func (SafeBatchNullified) Close

func (s SafeBatchNullified) Close() error

func (SafeBatchNullified) Delete

func (s SafeBatchNullified) Delete(key []byte) error

func (SafeBatchNullified) Set

func (s SafeBatchNullified) Set(key, value []byte) error

func (SafeBatchNullified) Write

func (s SafeBatchNullified) Write() error

func (SafeBatchNullified) WriteSync

func (s SafeBatchNullified) WriteSync() error

Jump to

Keyboard shortcuts

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