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

Include comparison operators for property value queries #227

Open
jasongoodwin opened this issue Jan 8, 2022 · 1 comment
Open

Include comparison operators for property value queries #227

jasongoodwin opened this issue Jan 8, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jasongoodwin
Copy link
Contributor

jasongoodwin commented Jan 8, 2022

Currently the property value queries only check for equivalence.
There are a couple ways that the queries could be improved:

  • Allow ord operators for numeric types (< and >)
  • Allow in and not in semantics on lists.

This would require an implicit schema - can't compare strings and numeric values, arrays, or objects directly.

See for example mongo's comparison operators:
https://docs.mongodb.com/manual/reference/operator/query-comparison/

Mongo left as a reference to unstructured store.

Postgres' json/jsonb query semantics would also be good inspiration.

@ysimonson
Copy link
Member

ysimonson commented Jan 13, 2022

Could you clarify what you mean by logical operators? We do support the ability to check that a property is or is not a given value.

Comparison operators are trickier. Since properties can be arbitrary JSON, it isn't possible to compare values (e.g. how do you compare a string to a number?) It could be doable if IndraDB added some notion of properties schema, i.e. enforce a property of a given name is a given type. To simplify things, this schema enforcement could only be applied to indexed properties. Once something like that were done, comparisons would be possible.

@ysimonson ysimonson added enhancement New feature or request help wanted Extra attention is needed labels Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants