Documentation ¶
Overview ¶
Package internal exposes internal functions used within db packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NonNilBytes ¶
NonNilBytes ensures that bz is a non-nil byte slice (ie. []byte{}).
We defensively turn nil keys or values into []byte{} for most operations.
Types ¶
type AtomicSetDeleter ¶
type MemBatch ¶
type MemBatch struct { DB AtomicSetDeleter Ops []Operation }
type MemIterator ¶
type MemIterator struct {
// contains filtered or unexported fields
}
We need a copy of all of the keys. Not the best, but probably not a bottleneck depending.
func NewMemIterator ¶
func NewMemIterator(db db.DB, keys []string, start, end []byte) *MemIterator
Keys is expected to be in reverse order for reverse iterators.
type MockIterator ¶
type MockIterator struct{}
func (MockIterator) Close ¶
func (MockIterator) Close()
func (MockIterator) Domain ¶
func (MockIterator) Domain() (start []byte, end []byte)
func (MockIterator) Key ¶
func (MockIterator) Key() []byte
func (MockIterator) Next ¶
func (MockIterator) Next()
func (MockIterator) Valid ¶
func (MockIterator) Valid() bool
func (MockIterator) Value ¶
func (MockIterator) Value() []byte
Click to show internal directories.
Click to hide internal directories.