Henrik Aasted Sørensen
98c595312a
libs/pubsub/query: add EXISTS operator (#4077)
## 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 |
5 years ago | |
---|---|---|
.. | ||
fuzz_test | copy events and pubsub packages from tmlibs | 7 years ago |
Makefile | test event bus | 7 years ago |
empty.go | libs/pubsub: relax tx querying (#4070) | 5 years ago |
empty_test.go | libs/pubsub: relax tx querying (#4070) | 5 years ago |
parser_test.go | libs/pubsub/query: add EXISTS operator (#4077) | 5 years ago |
peg.go | libs/pubsub/query: add EXISTS operator (#4077) | 5 years ago |
query.go | libs/pubsub/query: add EXISTS operator (#4077) | 5 years ago |
query.peg | libs/pubsub/query: add EXISTS operator (#4077) | 5 years ago |
query.peg.go | libs/pubsub/query: add EXISTS operator (#4077) | 5 years ago |
query_test.go | libs/pubsub/query: add EXISTS operator (#4077) | 5 years ago |