Versions in this module Expand all Collapse all v0 v0.1.3 Mar 1, 2026 Changes in this version type Config + Index bool + MMap bool v0.1.2 Feb 27, 2026 Changes in this version + const IDEnd + const IDStart + const TSEnd + const TSStart + const TypePos + var ErrExists = errors.New("document already exists") type Config + AutoCompact int type DB + func (db *DB) All() iter.Seq2[Document, error] + func (db *DB) Batch(docs ...Document) error + func (db *DB) Count() int + func (db *DB) Rename(old, new string) error + type Document struct + Data string + Label string type Header + State [6]uint64 v0.1.1 Feb 12, 2026 v0.1.0 Feb 10, 2026 Changes in this version + const AlgBlake2b + const AlgFNV1a + const AlgXXHash3 + const BloomK + const BloomSize + const HeaderSize + const LOCKFILE_EXCLUSIVE_LOCK — windows/amd64 + const LOCKFILE_FAIL_IMMEDIATELY — windows/amd64 + const MaxLabelSize + const MaxRecordSize + const MinRecordSize + const StateAll + const StateClosed + const StateNone + const StateRead + const TypeHistory + const TypeIndex + const TypeRecord + var ErrClosed = errors.New("database is closed") + var ErrCorruptHeader = errors.New("corrupt header") + var ErrCorruptIndex = errors.New("corrupt index") + var ErrCorruptRecord = errors.New("corrupt record") + var ErrDecompress = errors.New("decompression failed") + var ErrEmptyContent = errors.New("content cannot be empty") + var ErrInvalidLabel = errors.New("label contains invalid characters") + var ErrInvalidPattern = errors.New("invalid regex pattern") + var ErrLabelTooLong = errors.New("label exceeds maximum size") + var ErrNotFound = errors.New("document not found") + type CompactOptions struct + BlockReaders bool + PurgeHistory bool + type Config struct + BloomFilter bool + HashAlgorithm int + MaxRecordSize int + ReadBuffer int + SyncWrites bool + type DB struct + func Open(path string, config Config) (*DB, error) + func (db *DB) Close() error + func (db *DB) Compact() error + func (db *DB) Delete(label string) error + func (db *DB) Exists(label string) (bool, error) + func (db *DB) Get(label string) (string, error) + func (db *DB) History(label string) ([]Version, error) + func (db *DB) List() ([]string, error) + func (db *DB) MatchLabel(pattern string) ([]Match, error) + func (db *DB) Purge() error + func (db *DB) Rehash(newAlg int) error + func (db *DB) Repair(opts *CompactOptions) error + func (db *DB) Search(pattern string, opts SearchOptions) ([]Match, error) + func (db *DB) Set(label, content string) error + type Entry struct + DstOff int64 + ID string + Label string + Length int + SrcOff int64 + TS int64 + Type int + type Header struct + Algorithm int + Error int + Heap int64 + Index int64 + Timestamp int64 + Version int + type Index struct + ID string + Label string + Offset int64 + Timestamp int64 + Type int + type LockMode int + const LockExclusive + const LockShared + type Match struct + Label string + Offset int64 + type Record struct + Data string + History string + ID string + Label string + Timestamp int64 + Type int + type Result struct + Data []byte + ID string + Length int + Offset int64 + type SearchOptions struct + CaseSensitive bool + Decode bool + Limit int + type Version struct + Data string + TS int64