Skip to content

Examples

Working code examples demonstrating every feature of zkv.zig. Each example is self contained and can be compiled directly.

Examples

ExampleDescription
Basic CRUDSet, get, delete, exists, count, prefix iteration, and empty values
TransactionsBegin, commit, rollback, view, and update with atomic writes
Batch OperationsBatch set/delete/clear with collections and rollback
Backup and RestoreFirst class backup/restore for lossless database copies
Export JSONLExport database to JSONL format
Export CSVExport database to CSV format
SnapshotIn memory point in time snapshots
Export and ImportOverview of backup, restore, JSONL, CSV, and snapshots
Query OperationsSearch, filter, sorted entries, find, and iterators
CollectionsNamed collections, isolation, entries, keys, values, and clear
Update OperationsUpdate specific keys, batch updates, transactions, and delete
Open and CloseDatabase lifecycle, in memory behavior, and read only mode
CompressionNone, zstd, brotli, gzip compression with auto detect
StatisticsTrack reads, writes, hits, misses, and database info
Value StatesMissing, empty, and value semantics with transitions

Released under the MIT License.