localdb

package module
v0.0.0-...-5744cfe Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

View Source
var Logger = tempdb.Logger

share a logger with tempdb.

Functions

func New

func New(args ...any) (walletdb.DB, error)

create a new database.

func Open

func Open(args ...any) (walletdb.DB, error)

open an existing database.

Types

type DB

type DB struct {
	*tempdb.DB
	// contains filtered or unexported fields
}

func (*DB) BeginReadWriteTx

func (db *DB) BeginReadWriteTx() (walletdb.ReadWriteTx, error)

func (*DB) Update

func (db *DB) Update(fn func(tx walletdb.ReadWriteTx) error, reset func()) error

we need to override `tempdb.Update` here so we can ensure we call our `BeginReadWriteTx` and our update hook is added.

Jump to

Keyboard shortcuts

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