dbwrapper

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScheduleJob

func ScheduleJob(txw *WriteTxWrapper) func(name string, params interface{}) error

Types

type DB

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

func New

func New(db bolted.Database, vm *goja.Runtime, logger logr.Logger) *DB

func (*DB) Read

func (db *DB) Read(f func(*readTxWrapper) (interface{}, error)) (res interface{}, err error)

func (*DB) Watch

func (db *DB) Watch(matcher []string, fn func(interface{}) (bool, error)) (*observeSelectable, func())

func (*DB) Write

func (db *DB) Write(f func(*WriteTxWrapper) (interface{}, error)) (res interface{}, err error)

type WriteTxWrapper

type WriteTxWrapper struct {
	VM *goja.Runtime
	bolted.WriteTx
}

func (*WriteTxWrapper) CreateMap

func (wtw *WriteTxWrapper) CreateMap(path dbpath.Path) error

func (*WriteTxWrapper) Delete

func (wtw *WriteTxWrapper) Delete(path dbpath.Path) error

func (*WriteTxWrapper) Exists

func (wtw *WriteTxWrapper) Exists(path []string) (bool, error)

func (*WriteTxWrapper) Get

func (wtw *WriteTxWrapper) Get(path []string) (string, error)

func (*WriteTxWrapper) ID

func (wtw *WriteTxWrapper) ID() (uint64, error)

func (*WriteTxWrapper) IsMap

func (wtw *WriteTxWrapper) IsMap(path []string) (bool, error)

func (*WriteTxWrapper) Iterator

func (wtw *WriteTxWrapper) Iterator(path []string) (*iteratorWrapper, error)

func (*WriteTxWrapper) IteratorFor

func (wtw *WriteTxWrapper) IteratorFor(path []string, seek string, limit int) (*goja.Object, error)

func (*WriteTxWrapper) Put

func (wtw *WriteTxWrapper) Put(path dbpath.Path, value string) error

func (*WriteTxWrapper) ReverseIteratorFor added in v0.4.4

func (wtw *WriteTxWrapper) ReverseIteratorFor(path []string, seek string, limit int) (*goja.Object, error)

func (*WriteTxWrapper) Size

func (wtw *WriteTxWrapper) Size(path []string) (uint64, error)

Jump to

Keyboard shortcuts

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