Categorygithub.com/cznic/lldb
modulepackage
1.1.0
Repository: https://github.com/cznic/lldb.git
Documentation: pkg.go.dev

# README

lldb

Package lldb implements a low level database engine.

Installation: $ go get github.com/cznic/lldb

Documentation: godoc.org/github.com/cznic/lldb

# Functions

Collate collates two arrays of Go predeclared scalar types (and the typeless nil or []byte).
CreateBTree creates a new BTree in store.
DecodeScalars decodes a []byte produced by EncodeScalars.
EncodeScalars encodes a vector of predeclared scalar type values to a []byte, making it suitable to store it as a "record" in a DB or to use it as a key of a BTree.
MinWAL sets the minimum size a WAL file will have.
NewACIDFiler0 returns a newly created ACIDFiler0 with WAL in wal.
NewAllocator returns a new Allocator.
NewBTree returns a new, memory-only BTree.
NewInnerFiler returns a new InnerFiler wrapped by `outer` in a way which adds `off` to every access.
NewMemFiler returns a new MemFiler.
NewOSFiler returns a Filer from an OSFile.
NewRollbackFiler returns a RollbackFiler wrapping f.
NewSimpleFileFiler returns a new SimpleFileFiler.
OpenBTree opens a store's BTree using handle.
RemoveBTree removes tree, represented by handle from store.

# Constants

Adjacent free blocks (.Off and .Arg).
Used compressed block: corrupted compression.
Expected a free block tag, got .Arg.
Expected a used block tag, got .Arg.
File .Name size (.Arg) != 0 (mod 16).
Free block is invalid or referenced multiple times.
FLT truncated to .Off, need size >= .Arg.
Free block size (.Arg) doesn't belong to its list min size: .Arg2.
Free block, .prev.next doesn't point back to this block.
Last block is free.
Head of a free block list has non zero Prev (.Arg).
Reloc doesn't target (.Arg) a short or long used block.
Corrupted write ahead log.
Long free block spans beyond EOF, size .Arg.
Long free block must have at least 2 atoms, got only .Arg.
Long free block .Next (.Arg) spans beyond EOF.
Long free block .Prev (.Arg) spans beyond EOF.
Expected a long free block tail tag, got .Arg.
Free block is not in any FLT list.
Used reloc block with nil target.
ErrILSEQ types.
Used reloc points (.Arg) beyond EOF.
Expected a short free block tail tag, got .Arg.
Request for a free block (.Arg) returned a too small one (.Arg2) at .Off.
Block at .Off has invalid tail CC (compression code) tag, got .Arg.
Unexpected reloc block referred to from reloc block .Arg.
Used block has nonzero padding.
Long free block size .Arg but tail size .Arg2.
Used block size (.Arg) spans beyond EOF.

# Structs

ACIDFiler0 is a very simple, synchronous implementation of 2PC.
Allocator implements "raw" storage space management (allocation and deallocation) for a low level of a DB engine.
AllocStats record statistics about a Filer.
BTree is a B+tree[1][2], i.e.
BTreeEnumerator captures the state of enumerating a tree.
ErrDecodeScalars is possibly returned from DecodeScalars.
ErrILSEQ reports a corrupted file format.
ErrINVAL reports invalid values passed as parameters, for example negative offsets where only non-negative ones are allowed or read from the DB.
ErrPERM is for example reported when a Filer is closed while BeginUpdate(s) are not balanced with EndUpdate(s)/Rollback(s) or when EndUpdate or Rollback is invoked which is not paired with a BeginUpdate.
A InnerFiler is a Filer with added addressing/size translation.
MemFiler is a memory backed Filer.
Options are passed to the NewAllocator to amend some configuration.
OSFiler is like a SimpleFileFiler but based on an OSFile.
RollbackFiler is a Filer implementing structural transaction handling.
SimpleFileFiler is an os.File backed Filer intended for use where structural consistency can be reached by other means (SimpleFileFiler is for example wrapped in eg.

# Interfaces

A Filer is a []byte-like model of a file or similar entity.
OSFile is an os.File like minimal set of methods allowing to construct a Filer.

# Type aliases

ErrTag represents an ErrILSEQ kind.
WALOption amends WAL properties.