-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add collection_property
helper to simplify building property filters
#331
Conversation
could also be considered a solution for #246 |
I like that, although could "collection_property" be a bit shorter? :-) prop, field, property, key or so. Because it is longer than before now:
|
It's indeed longer, but only in number of characters.
|
I also expect that users are going to copy-paste from example snippets (or use AI driven code generators in the future 😛 ), so I don't think that the extra typing effort for |
But if they copy/use AI anyway, then you can simply stick with Another reason not to use collection_filter: We also have other processes that use the property filtering, which are not related to collections, e.g. filter_labels. So I'd argue |
However, I personally still like the concreteness of something like
Another alternative is using the terminology "metadata property" as used in the description of
|
I just checked it against and my claim that filter_label also uses this is wrong. In all other "logical expressions" (filter_labels, count, aray_filter) you have direct values to work against and don't need the special handling. In the schema the subtype is called |
…s for load_collection
59d725c
to
f143c7a
Compare
… filters for load_collection
…roperty filters for load_collection
We decided to push this forward, still sticking with |
…lding property filters for load_collection
(squashed and) merged in 40be725 |
While working on #328, I thought of this proof of concept to simplify specifying simple collection property filters.
Usage example:
note that
properties
is now a list (instead of a dictionary),containing these
collection_property
operator tricks that are translated to the proper process graphs