diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-03 08:54:00 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-03 08:54:00 +0000 |
| commit | 2f8ecd482077d82f2d1a937c7f979eaaa87a27b2 (patch) | |
| tree | cd892cde6ef6fd7ff654377946cab5b95339276f /.env.example | |
| parent | 62a3855cb96616caf704a0f112fb2ade99fb8b45 (diff) | |
feat: implement LMDB database backend
- Add nostr-lmdb dependency (v0.44) for persistent storage
- Create SharedDatabase type alias for database abstraction
- Update all database-related functions to use trait object
- Support runtime selection via NGIT_DATABASE_BACKEND env var
Database backends:
- memory: In-memory (default, fastest, no persistence)
- lmdb: LMDB backend (persistent, general purpose)
All 34 tests pass with the new implementation.
Diffstat (limited to '.env.example')
| -rw-r--r-- | .env.example | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.env.example b/.env.example index 0a27bbb..796415e 100644 --- a/.env.example +++ b/.env.example | |||
| @@ -17,7 +17,7 @@ NGIT_RELAY_DATA_PATH=./data/relay | |||
| 17 | # Database backend (memory, nostrdb, lmdb) | 17 | # Database backend (memory, nostrdb, lmdb) |
| 18 | # - memory: In-memory database (default, fastest, no persistence) | 18 | # - memory: In-memory database (default, fastest, no persistence) |
| 19 | # - nostrdb: NostrDB backend (persistent, optimized for Nostr) [Not yet implemented] | 19 | # - nostrdb: NostrDB backend (persistent, optimized for Nostr) [Not yet implemented] |
| 20 | # - lmdb: LMDB backend (persistent, general purpose) [Not yet implemented] | 20 | # - lmdb: LMDB backend (persistent, general purpose) |
| 21 | NGIT_DATABASE_BACKEND=memory | 21 | NGIT_DATABASE_BACKEND=memory |
| 22 | 22 | ||
| 23 | # Server configuration | 23 | # Server configuration |