Skip to main content

Open

Opens or creates a database file. Applies WAL on startup for crash recovery.

Close

Waits for in-flight transactions and closes the database. Idempotent for nil receiver.

Compact

Copy-compacts an open database to a new file, reclaiming space from deleted records. Preserves all data including MVCC history.

CompactTo

Standalone compaction from source to destination:
Destination inherits format version, MVCC flag, MaxValueBytes, and encryption from source. Encryption credentials must be supplied for encrypted sources.

Configuration options

Runtime properties

PageSize

Returns the active page size in bytes (4096 default for new databases).

MaxValueBytes

Returns the effective per-database max value size in bytes from the file header.

EmbeddingDimension

Returns the configured vector dimension (0 = disabled).

EmbeddingMetric

Returns the configured distance metric.

Storage limits

  • Maximum key length: 256 bytes
  • Maximum value length: Configurable via MaxValueBytes (512 to 1,048,576 bytes; default 8192)
  • Page size: Configurable via PageSize (4096 to 65536 bytes; default 4096)
  • Compression: DEFLATE always-on for values ≥ 64 bytes

Errors

See also