Skip to content

passing array of filters to QueryEvents #30

Description

@barkyq

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions