Was thinking about this lately:
QueryEvents(filter *nostr.Filter) (events []nostr.Event, err error)
could be changed to:
QueryEvents(filters ...nostr.Filter) (events []nostr.Event, err error)
or:
QueryEvents(filters []nostr.Filter) (events []nostr.Event, err error)
so as to enable queries with a single call to SQL (using UNION)... but this would probably break other implementations using the relayer framework.
The current implementation potentially sends duplicate events back to the user (although this could be solved quickly via a deduplication step prior to writing to the websocket). Perhaps the above change would be a more principled solution.
Was thinking about this lately:
could be changed to:
or:
so as to enable queries with a single call to SQL (using UNION)... but this would probably break other implementations using the relayer framework.
The current implementation potentially sends duplicate events back to the user (although this could be solved quickly via a deduplication step prior to writing to the websocket). Perhaps the above change would be a more principled solution.