Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Uint64Codec = uint64Codec{} Int64Codec = int64Codec{} Float64Codec = float64Codec{} StringCodec = stringCodec{} BytesCodec = bytesCodec{} )
View Source
var ErrIterationDone = pogreb.ErrIterationDone
Functions ¶
This section is empty.
Types ¶
type DB ¶
func Open ¶
func Open[KT, VT any](path string, keyCodec Codec[KT], valCodec Codec[VT]) (db DB[KT, VT], err error)
Open opens or creates a new DB. The DB must be closed after use, by calling Close method.
func OpenOptions ¶
func OpenOptions[KT, VT any](path string, keyCodec Codec[KT], valCodec Codec[VT], opts *Options) (db DB[KT, VT], err error)
OpenOptions is like Open but accepts an Options struct.
func (DB[KT, VT]) Fold ¶
Fold iterates over all keys in the database calling the function `fn` for each key. If the function returns an error, no further keys are processed and the error returned.
func (DB[KT, VT]) Get ¶
Get returns the value for the given key stored in the DB or an empty value if the key doesn't exist.
Click to show internal directories.
Click to hide internal directories.