storage

package
v0.0.0-...-2791ee3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrReadOnly = errors.New("read only store")
View Source
var ErrUnknownTable = errors.New("unknown table")

Functions

This section is empty.

Types

type Cursor

type Cursor interface {
	Next() bool
	This() []domain.Word
	Err() error
}

type Engine

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

func New

func New(path string) (*Engine, error)

func (*Engine) Begin

func (e *Engine) Begin() (*Transaction, error)

func (*Engine) Close

func (e *Engine) Close() error

func (*Engine) GetEntities

func (e *Engine) GetEntities(typeID domain.Word, key []domain.Word) Cursor

type Transaction

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

func (*Transaction) Commit

func (tx *Transaction) Commit() error

func (*Transaction) DeleteEntity

func (tx *Transaction) DeleteEntity(typeID domain.Word, key []domain.Word) error

func (*Transaction) GetEntities

func (tx *Transaction) GetEntities(typeID domain.Word, key []domain.Word) Cursor

func (*Transaction) PutEntity

func (tx *Transaction) PutEntity(typeID domain.Word, row []domain.Word) error

func (*Transaction) Rollback

func (tx *Transaction) Rollback() error

Jump to

Keyboard shortcuts

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