db

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch interface {
	Writer
	Delete(key []byte) error
	Commit() error
	Close() error
}

Batch represents an atomic batch of operations. All operations in a batch are performed atomically.

type Iterator

type Iterator interface {
	Next() bool
	Key() []byte
	Value() ([]byte, error)
	Valid() bool
	Close() error
}

Iterator provides sequential access over a range of key-value pairs. Iterators must be closed after use.

type KVStore

type KVStore interface {
	Writer
	Get(key []byte) ([]byte, error)
	Delete(key []byte) error
	NewBatch() Batch
	NewIterator(start, end []byte) (Iterator, error)
	Close() error
}

KVStore represents a key-value storage interface providing basic operations for data manipulation and iteration.

type Writer

type Writer interface {
	Put(key []byte, value []byte) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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