done. nostrdb has streaming/aggregation queries now!
I did something for this PR: i just took the entire diff and said "generate a friendly article describing this change". ai still can't write C code for shit but at least its good at docs.

GitHub
Add visitor queries by jb55 · Pull Request #118 · damus-io/nostrdb
Streaming Queries with ndb_query_visit
What problem does this solve?
Before this change, every query in nostrdb worked the same way:
it collected a...
I love new use cases because it forces me to implement new nostrdb features. In this case i realized i don’t have a way to stream over potentially millions of notes without building up a large query result buffer which would use up lots of memory.
So now i’m adding a new feature called ndb_query_visit which will allow you to stream results out of the database to accumulate aggregate values (counting things, grouping things, etc)
View quoted note →
View quoted note →