storage

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: BSD-3-Clause-Clear Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load[T Value](s Store, dest T, owner kvs.UUID, rowID uint32) error

func LoadAll

func LoadAll[T Value](s Store, owner kvs.UUID) ([]T, error)

func LoadAllWithEvaluator

func LoadAllWithEvaluator[T Value](s Store, owner kvs.UUID, pred func(e kvs.Entry) bool) ([]T, error)

Types

type Store

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

func New

func New(db kvs.KVDB) Store

func (Store) Close

func (s Store) Close() (err error)

func (Store) Delete

func (s Store) Delete(owner kvs.UUID, value Value, rowID uint32) error

func (Store) Save

func (s Store) Save(owner kvs.UUID, value Value) error

func (Store) Update

func (s Store) Update(owner kvs.UUID, value Value, rowID uint32) error

type Value

type Value interface {
	TableName() string
}

Jump to

Keyboard shortcuts

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