| |
|
|
|
|
|
|
|
|
|
|
|
| |
Query implementation:
- QueryEvents method with filter support
- Full NIP-01 filter support (ids, authors, kinds, tags, since, until, limit)
- ID and pubkey prefix matching
- Tag filtering using SQLite JSON functions
- Multiple filter UNION support
- DESC ordering by created_at
- Optional canonical JSON inclusion
23 tests passing, 1322 total lines
|
|
|
Storage implementation:
- Concrete type with constructor (consumer-side interfaces)
- Event storage: protobuf + zstd-compressed canonical JSON
- Schema: events, deletions, replaceable_events, auth_challenges, rate_limits
- WAL mode, STRICT typing, optimized indexes
- Methods: StoreEvent, GetEvent, GetEventWithCanonical, DeleteEvent
Dependencies:
- modernc.org/sqlite v1.45.0 (pure Go SQLite driver)
- github.com/klauspost/compress v1.18.4 (zstd compression)
366 lines, 10 tests passing
|