Added failing unit tests
fixed parser to account for NOT prior to parentheses
TODO
[ ] Figure out how to distinguish NOT with 1 following condition vs multiple
The way the data model and parser is setup, there is not a good way to distinguish the following cases:
SELECT AnnualRevenue FROM Account WHERE NOT (AnnualRevenue > 0 AND AnnualRevenue < 200000) LIMIT 1SELECT AnnualRevenue FROM Account WHERE ((NOT AnnualRevenue > 0) AND AnnualRevenue < 200000) LIMIT 1
EDIT
This bug will likely require some changes to the data model and will require changes to parsing and visiting nodes to account for a valid query like this SELECT Id FROM Account WHERE ((NOT (Name = '2' OR Name = '3'))) with the ability to compose back into soql.
resolves #122
Here is how this is handled by mulesoft's Java implementation:
Added failing unit tests fixed parser to account for NOT prior to parentheses
TODO
The way the data model and parser is setup, there is not a good way to distinguish the following cases:
SELECT AnnualRevenue FROM Account WHERE NOT (AnnualRevenue > 0 AND AnnualRevenue < 200000) LIMIT 1
SELECT AnnualRevenue FROM Account WHERE ((NOT AnnualRevenue > 0) AND AnnualRevenue < 200000) LIMIT 1
EDIT
This bug will likely require some changes to the data model and will require changes to parsing and visiting nodes to account for a valid query like this
SELECT Id FROM Account WHERE ((NOT (Name = '2' OR Name = '3')))
with the ability to compose back into soql.resolves #122
Here is how this is handled by mulesoft's Java implementation: