Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Beginner ¶
type Beginner interface { // Begin begins a transaction or sub-transaction with a prefix applied to keys. Begin(prefix *database.Key, writable bool) ChangeSet }
A Beginner can begin key-value change sets.
type ChangeSet ¶
type ChangeSet interface { Store Beginner // Commit commits pending changes. Commit() error // Discard discards pending changes. Discard() }
ChangeSet is a key-value change set.
type RecordStore ¶
type RecordStore struct {
Store Store
}
RecordStore implements database.Store.
func (RecordStore) Unwrap ¶
func (s RecordStore) Unwrap() Store
Unwrap returns the underlying store.
type Store ¶
type Store interface { // Get loads a value. Get(*record.Key) ([]byte, error) // Put stores a value. Put(*record.Key, []byte) error // Delete deletes a key-value pair. Delete(*record.Key) error // ForEach iterates over each value. ForEach(func(*record.Key, []byte) error) error }
Store is a key-value store.
Click to show internal directories.
Click to hide internal directories.