Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement generic filters #90

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

ajnavarro
Copy link
Collaborator

@ajnavarro ajnavarro commented Sep 10, 2024

I added a new query API to implement the first version of generic filters. The previous API is still working, I added this as an EXPERIMENTAL preview to gather feedback.

New features:

  • New subscription and query methods implemented using the new Filter objects
  • Filter using AND and OR and NOT filters. Implemented expressions: ==,!=, <, >, EXISTS, LIKE (using regular expressions).
  • You can filter using 99% of existing fields.
  • Added default examples showing how the filter API works. more examples will be added.

Please, any feedback is welcome!

Simple example query:

https://github.com/gnolang/tx-indexer/pull/90/files#diff-ab80be59ac3c22370754caec134ff00ed78559b8aefc392f485b730db636b44aR1-R14

@ajnavarro ajnavarro requested a review from a team as a code owner September 10, 2024 18:42
@ajnavarro ajnavarro marked this pull request as draft September 10, 2024 18:46
@ajnavarro ajnavarro changed the title feature: Implement generic filters feat: Implement generic filters Sep 11, 2024
Added new query API implementing a first version of generic filters.

Some things are missing:

- No subscriptions yet, almost there
- No filters for multi type fields like messages, still thinking about
  how to implement the API to make it user friendly.

Please, any feedback is welcome!

Signed-off-by: Antonio Navarro Perez <[email protected]>
Signed-off-by: Antonio Navarro Perez <[email protected]>
Signed-off-by: Antonio Navarro Perez <[email protected]>
Signed-off-by: Antonio Navarro Perez <[email protected]>
Signed-off-by: Antonio Navarro Perez <[email protected]>
Signed-off-by: Antonio Navarro Perez <[email protected]>
Signed-off-by: Antonio Navarro Perez <[email protected]>
Signed-off-by: Antonio Navarro Perez <[email protected]>
@ajnavarro ajnavarro marked this pull request as ready for review September 19, 2024 11:52
Signed-off-by: Antonio Navarro Perez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

1 participant