Examples
Working code examples demonstrating every feature of zkv.zig. Each example is self contained and can be compiled directly.
Examples
| Example | Description |
|---|---|
| Basic CRUD | Set, get, delete, exists, count, prefix iteration, and empty values |
| Transactions | Begin, commit, rollback, view, and update with atomic writes |
| Batch Operations | Batch set/delete/clear with collections and rollback |
| Backup and Restore | First class backup/restore for lossless database copies |
| Export JSONL | Export database to JSONL format |
| Export CSV | Export database to CSV format |
| Snapshot | In memory point in time snapshots |
| Export and Import | Overview of backup, restore, JSONL, CSV, and snapshots |
| Query Operations | Search, filter, sorted entries, find, and iterators |
| Collections | Named collections, isolation, entries, keys, values, and clear |
| Update Operations | Update specific keys, batch updates, transactions, and delete |
| Open and Close | Database lifecycle, in memory behavior, and read only mode |
| Compression | None, zstd, brotli, gzip compression with auto detect |
| Statistics | Track reads, writes, hits, misses, and database info |
| Value States | Missing, empty, and value semantics with transitions |
