eventstore: QueryEvents() to take a maxLimit param now so everything is clearer.

This commit is contained in:
fiatjaf
2025-05-11 09:36:59 -03:00
parent 9118217048
commit f60fc08f8d
40 changed files with 108 additions and 151 deletions

View File

@@ -108,15 +108,15 @@ func main() {
### But I don't want to write my own database!
Fear no more. Using the https://fiatjaf.com/nostr/eventstore module you get a bunch of compatible databases out of the box and you can just plug them into your relay. For example, [sqlite](https://pkg.go.dev/fiatjaf.com/nostr/eventstore/sqlite3):
Fear no more. Using the https://fiatjaf.com/nostr/eventstore module you get a bunch of compatible databases out of the box and you can just plug them into your relay. For example, [sqlite](https://pkg.go.dev/fiatjaf.com/nostr/eventstore/lmdb):
```go
db := sqlite3.SQLite3Backend{DatabaseURL: "/tmp/khatru-sqlite-tmp"}
db := lmdb.LMDBackend{Path: "/tmp/khatru-lmdb-tmp"}
if err := db.Init(); err != nil {
panic(err)
}
relay.UseEventstore(db)
relay.UseEventstore(db, 500)
```
### But I don't want to write a bunch of custom policies!