Open sharan-nyn opened 5 years ago
Hi, I am converting SQL WHERE clause to TaffyDB queries. I think I have found one possible combination that cannot be implemented into a TaffyDB query.
A query like:
(Type='Food' OR Amount=27) AND (Currency='INR' OR Amount=26)
can be converted to TaffyDB query as:
[ [{"Type":{"==":"Food"}}, {"Amount":{"==":27}}], [{"Currency":{"==":"INR"}, {"Amount":{"==":26}}] ]
the [...] is used to group two filters in an 'OR' condition and 'comma' separation works like 'AND' in this case.
[...]
However query like:
(Type='Food' AND Amount=27) OR (Currency='INR' AND Amount=26)
Cannot be converted to TaffyDB query, since there is no specific syntax for 'AND' like 'OR' in TaffyDB.
Agreed. I believe one could write a callback function to sort, but this would be useful in the core.
Hi, I am converting SQL WHERE clause to TaffyDB queries. I think I have found one possible combination that cannot be implemented into a TaffyDB query.
A query like:
can be converted to TaffyDB query as:
the
[...]
is used to group two filters in an 'OR' condition and 'comma' separation works like 'AND' in this case.However query like:
Cannot be converted to TaffyDB query, since there is no specific syntax for 'AND' like 'OR' in TaffyDB.