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

Search for things/features with pending "desired" properties #702

Open
thjaeckle opened this issue Jun 19, 2020 · 1 comment
Open

Search for things/features with pending "desired" properties #702

thjaeckle opened this issue Jun 19, 2020 · 1 comment

Comments

@thjaeckle
Copy link
Member

thjaeckle commented Jun 19, 2020

As an enhancement of #696 it should be possible via the Ditto search to find out which things have pending (not yet applied) "desiredProperties".

The syntax for that could be:

exists(features/*/desiredProperties)     // if we also delete an empty "desiredProperties" when all desired properties were cleared
exists(features/*/desiredProperties/*)

# or introducing a new RQL keyword for checking if a JSON value (object, array, string?) is empty:
empty(features/*/desiredProperties)
not(empty(features/*/desiredProperties))
  • define the RQL syntax
  • implement the query to do against the search index to support that
@jufickel-b
Copy link

jufickel-b commented Jun 19, 2020

I favor the "exists" approach. If a feature has no desired state then there shouldn't be a "desired" field in the JSON object – even if it is empty. I. e. as soon as the desired state is reached the "desired" field should be deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants