Skip to main content

Options structure

MVCC options

EnableMVCC

Enables multi-version concurrency control for snapshot isolation and time-travel queries.
When enabled, the database uses format v2 with MVCC-specific key encoding.

MVCCRetention

Configures how much commit history to retain for prune suggestions.
Retention is in commits, not wall-clock time. Zero (default) disables automatic suggestions.

Changelog options

ChangelogEnabled

Enables the logical changefeed for audit trails and CDC.
Creates a sidecar file {primary}-changelog that records all mutations.

Encryption options

EncryptionKey

Raw 32-byte encryption key for AES-256-XTS.

Passphrase

Passphrase for key derivation using Argon2id and HKDF-SHA256.
Use either EncryptionKey or Passphrase, not both.

Storage options

PageSize

Page size for the B+ tree. Accepted values: 4096, 8192, 16384, 65536 bytes. Default: 4096.
Smaller pages reduce wasted space for small databases. Larger pages improve throughput for large values.

MaxValueBytes

Maximum value length per database. Accepted values: 512 to 1,048,576 bytes. Default: 8192.
Values exceeding the page’s inline threshold are stored in overflow pages automatically.

Embedding options

EmbeddingDimension

Fixed vector dimension for new databases. 0 = disabled. Immutable after creation.

DistanceMetric

Similarity function for embedding search.
Available metrics:
  • DistanceCosine (default) — Cosine similarity, range [-1, 1]
  • DistanceDotProduct — Raw dot product, assumes normalized vectors
  • DistanceL2 — Euclidean distance, inverted for ranking

Hooks

CellValidator

Called before writing a cell to validate or reject it.

AfterPutCell

Called after successfully writing a cell.

AfterPutSeam

Called after successfully writing a seam.

See also