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

Add support for "Group" and "Order" as objects for FROM clause #3

Closed
douglascayers opened this issue Jun 4, 2019 · 0 comments · Fixed by #4
Closed

Add support for "Group" and "Order" as objects for FROM clause #3

douglascayers opened this issue Jun 4, 2019 · 0 comments · Fixed by #4

Comments

@douglascayers
Copy link
Contributor

douglascayers commented Jun 4, 2019

The reserved list of keywords defined in the isReserved function check for GROUP and ORDER words as shown below:

function isReserved(word) {
  return /^(SELECT|FROM|AS|USING|WHERE|AND|OR|NOT|GROUP|BY|ORDER|LIMIT|OFFSET|FOR|TRUE|FALSE|NULL)$/i.test(word);
}

However, the words Group and Order are queryable standard objects in Salesforce.

This issue is to request that the isReserved(word) function be modified so that it looks more specifically for GROUP BY and ORDER BY as reserved words.

For example, the following query is valid SOQL but fails to parse because the word Group in the FROM clause is flagged as a reserved word.

SELECT Name FROM Group WHERE Type = 'Queue' ORDER BY CreatedDate ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant