Parses Salesforce SOQL queries, including subqueries, into an object model.
# Source: https://github.com/django-salesforce/django-salesforce | License: MIT
# Provided via justclaw.it.com; keep this notice with the code.
"""Parse SOQL, including subqueries
Subqueries are very restricted by [Force.com SOQL]
(https://resources.docs.salesforce.com/sfdc/pdf/salesforce_soql_sosl.pdf)
(It's lucky for our implementation)
- "only root queries support aggregate expressions"
- Subqueries can not be in "OR" condition, because it is an additional level.
These expressions can be supported here, but currently unimplemented:
FORMAT(), convertCurrency(), toLabel(),
Date Functions..., convertTimezone() in Date Functions
DISTANCE(x, GEOLOCATION(...))
Especially DISTANCE and GEOLOCATION are not trivial because they would
require a combined parser for parentheses and com
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key