batchdb

package
v0.0.0-...-77dcbbd Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package batchdb provides the prefixed db feature without diff functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

func New

func New(database *db.DB, batch *db.Batch) *Database

BatchDB fetch data from underlying DB and set/del to batch.

func NewWithPrefix

func NewWithPrefix(database *db.DB, batch *db.Batch, prefix []byte) *Database

func (*Database) Del

func (b *Database) Del(key []byte)

func (*Database) Get

func (b *Database) Get(key []byte) ([]byte, bool)

func (*Database) Set

func (b *Database) Set(key, value []byte)

Jump to

Keyboard shortcuts

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