jetstreamapp / soql-parser-js

Javascript SOQL parser
https://jetstreamapp.github.io/soql-parser-js/
MIT License
79 stars 20 forks source link

Revisit types for where clause #128

Closed paustint closed 2 years ago

paustint commented 3 years ago

Description

The types are overly difficult to construct because of strict typing.

Some possible areas to improve:

  1. Condition is hard to work with because NegationCondition
    • Add isNotNegationCondition() and maybe isRegularCondition that would typecast to this:
    • ValueCondition | ValueWithDateLiteralCondition | ValueWithDateNLiteralCondition | ValueFunctionCondition
  2. Add an available type for ValueCondition | ValueWithDateLiteralCondition | ValueWithDateNLiteralCondition | ValueFunctionCondition as an escape hatch in case a user wants to skip checking and cast.

remaining issues TBD