Skip to content

Instantly share code, notes, and snippets.

@cwarden
Created June 1, 2012 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwarden/2854284 to your computer and use it in GitHub Desktop.
Save cwarden/2854284 to your computer and use it in GitHub Desktop.
String soql = new al.SoqlBuilder()
.fromx('account')
.wherex(
new al.AndCondition()
.add(new al.NotCondition(new al.FieldCondition('name', 'acme')))
.add(new al.FieldCondition('ispartner', true))
)
.toSoql();
Database.query(soql);
WHERE (NOT(name = 'acme') AND ispartner = true)
WHERE ((NOT(name = 'acme')) AND ispartner = true)
System.QueryException: expecting a right parentheses, found 'AND'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment