Created
June 1, 2012 18:39
-
-
Save cwarden/2854284 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WHERE (NOT(name = 'acme') AND ispartner = true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WHERE ((NOT(name = 'acme')) AND ispartner = true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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