Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangesList ¶
ChangesList is an array of changes to a db. Each change consist of a map between a changed entity ID and the change
type DBReadOnly ¶
DBReadOnly is a read-only typeddb to be use in unittests
func (*DBReadOnly) Snapshot ¶
func (mDB *DBReadOnly) Snapshot() limestone.Snapshot
Snapshot returns the DB current state
type DBReadWrite ¶
type DBReadWrite struct { DBReadOnly // contains filtered or unexported fields }
DBReadWrite is a DBReadWrite typeddb to be use in unittests
func NewDBReadWrite ¶
func NewDBReadWrite(db *typeddb.TypedDB) *DBReadWrite
NewDBReadWrite returns new instance of DBReadWrite
func (*DBReadWrite) Changes ¶
func (pDB *DBReadWrite) Changes() ChangesList
Changes returns the DB changes list
func (*DBReadWrite) Do ¶
func (pDB *DBReadWrite) Do(fn func(txn limestone.Transaction))
Do executes the function on the transaction and saves the changes
func (*DBReadWrite) DoE ¶
func (pDB *DBReadWrite) DoE(fn func(txn limestone.Transaction) error) error
DoE executes the function on the transaction and saves the changes
func (*DBReadWrite) Snapshot ¶
func (pDB *DBReadWrite) Snapshot() limestone.Snapshot
Snapshot returns the DB current state
Click to show internal directories.
Click to hide internal directories.