Skip to content

Relax Tx Querying#4070

Merged
melekes merged 32 commits intomasterfrom
bez/relax-event-querying
Oct 28, 2019
Merged

Relax Tx Querying#4070
melekes merged 32 commits intomasterfrom
bez/relax-event-querying

Conversation

@alexanderbez
Copy link
Contributor

@alexanderbez alexanderbez commented Oct 21, 2019

  • Some linting/cleanup missed from the initial events refactor
  • Don't panic; instead, return false, error when matching breaks unexpectedly
  • Strip non-numeric chars from values when attempting to match against query values
  • Have the server log during send upon error

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG_PENDING.md

@alexanderbez alexanderbez marked this pull request as ready for review October 21, 2019 18:23
@alexanderbez alexanderbez added C:libs Component: Library R4R and removed WIP labels Oct 21, 2019
@alexanderbez alexanderbez requested a review from melekes October 21, 2019 19:07
@alexanderbez alexanderbez requested a review from melekes October 23, 2019 13:19
@melekes
Copy link
Contributor

melekes commented Oct 23, 2019

TODO: I would rather use an actual logger with a tagged module/context instead of fmt.Printf. We can use a private package-level logger if you're OK with this @melekes.

I very hesitant of adding logger to Query struct (seems wrong for some reason, lol). What if we just use stdlib logger? Or maybe refactor Query#Matches to return an error.

@tac0turtle
Copy link
Contributor

libs/pubsub/query/query.go:326:16: multiple-value matchValue() in single-value context

@alexanderbez alexanderbez added WIP and removed R4R labels Oct 24, 2019
@alexanderbez alexanderbez added R4R T:breaking Type: Breaking Change and removed WIP labels Oct 24, 2019
alexanderbez and others added 12 commits October 24, 2019 14:51
Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
@alexanderbez alexanderbez requested a review from melekes October 25, 2019 14:25
@alexanderbez
Copy link
Contributor Author

R4R again :)

Copy link
Contributor

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@melekes melekes merged commit c5bcdd3 into master Oct 28, 2019
@melekes melekes deleted the bez/relax-event-querying branch October 28, 2019 06:38
melekes pushed a commit that referenced this pull request Nov 7, 2019
## Issue:

This PR adds an "EXISTS" condition to the event query grammar. It enables querying for the occurrence of an event without having to provide a condition for one of its attributes.

As an example, someone interested in all slashing events might currently catch them with a query such as slash.power > 0.

With this PR the event can be captured with slash.power EXISTS or just slash EXISTS to catch by event type.

## Examples:

`slash EXISTS`

## Commits:

* Add EXISTS condition to query grammar

* Gofmt files

* Move PEG instructions out of auto-generated file to prevent overwrite

* Update libs/pubsub/query/query.go

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* Update changelog and add test case

* Merge with other changes in PR #4070

* Add EXISTS to Conditions() func

* Apply gofmt

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

Labels

C:libs Component: Library T:breaking Type: Breaking Change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants