sqlite

package
v2.0.0-...-fda440d Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 12 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 struct {
	// contains filtered or unexported fields
}

func NewBatch

func NewBatch(db *sql.DB, version uint64) (*Batch, error)

func (*Batch) Delete

func (b *Batch) Delete(storeKey, key []byte) error

func (*Batch) Reset

func (b *Batch) Reset() error

func (*Batch) Set

func (b *Batch) Set(storeKey, key, value []byte) error

func (*Batch) Size

func (b *Batch) Size() int

func (*Batch) Write

func (b *Batch) Write() error

type Database

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

func New

func New(dataDir string) (*Database, error)

func (*Database) Close

func (db *Database) Close() error

func (*Database) Get

func (db *Database) Get(storeKey []byte, targetVersion uint64, key []byte) ([]byte, error)

func (*Database) GetLatestVersion

func (db *Database) GetLatestVersion() (uint64, error)

func (*Database) Has

func (db *Database) Has(storeKey []byte, version uint64, key []byte) (bool, error)

func (*Database) Iterator

func (db *Database) Iterator(storeKey []byte, version uint64, start, end []byte) (corestore.Iterator, error)

func (*Database) NewBatch

func (db *Database) NewBatch(version uint64) (store.Batch, error)

func (*Database) PrintRowsDebug

func (db *Database) PrintRowsDebug()

func (*Database) Prune

func (db *Database) Prune(version uint64) error

Prune removes all versions of all keys that are <= the given version. It keeps the latest (non-tombstoned) version of each key/value tuple to handle queries above the prune version. This is analogous to RocksDB full_history_ts_low.

We perform the prune by deleting all versions of a key, excluding reserved keys, that are <= the given version, except for the latest version of the key.

func (*Database) ReverseIterator

func (db *Database) ReverseIterator(storeKey []byte, version uint64, start, end []byte) (corestore.Iterator, error)

func (*Database) SetLatestVersion

func (db *Database) SetLatestVersion(version uint64) error

Jump to

Keyboard shortcuts

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