LemonCore. Store. JsonlBackend
(lemon_core v0.1.0)
View Source
Persistent JSONL-based storage backend with dynamic table support.
Stores all operations as append-only JSONL (JSON Lines) files. Each logical table is stored in a separate file within the configured directory.
Options
:path- Required. Directory path where JSONL files will be stored.
File Format
Each line is a JSON object with the structure:
{"op": "put"|"delete", "key": <key>, "value": <value>, "ts": <unix_ms>}On init, all existing *.jsonl files in the store directory are loaded.
New tables are created on first write.
Summary
Functions
Ensure a table is loaded into memory.
If the table file exists but hasn't been loaded, it will be loaded. If the table doesn't exist, it will be marked as loaded (empty).
List all loaded tables.