Visitar URL original
feat: Salesforce SOQL `INCLUDES` and `EXCLUDES` operators by lucarota · Pull Request #1985 · JSQLParser/JSqlParser · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
style: Add missing whitespaces
  • Loading branch information
lucarota-eutelsat committed Mar 31, 2024
commit becbae27971a6708413cbfa649aec64484411024
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public void testAnalyticExpressionWithPartialWindowElement() throws JSQLParserEx
public void testIncludesExpression() throws JSQLParserException {
final List<Object> exprList = new ArrayList<>();
PlainSelect plainSelect = (PlainSelect) CCJSqlParserUtil
.parse("select id from foo where b includes ('A', 'B')");
.parse("select id from foo where b includes ('A', 'B')");
Expression where = plainSelect.getWhere();
where.accept(new ExpressionVisitorAdapter() {

Expand All @@ -296,7 +296,7 @@ public void visit(IncludesExpression expr) {
public void testExcludesExpression() throws JSQLParserException {
final List<Object> exprList = new ArrayList<>();
PlainSelect plainSelect = (PlainSelect) CCJSqlParserUtil
.parse("select id from foo where b Excludes ('A', 'B')");
.parse("select id from foo where b Excludes ('A', 'B')");
Expression where = plainSelect.getWhere();
where.accept(new ExpressionVisitorAdapter() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ void testMSSQLBlock() throws JSQLParserException {
@Test
void testSOQLIncludes() throws JSQLParserException {
String sqlStr =
"select name,\ngoods from test_table where option includes ('option1', 'option2')";
"select name,\ngoods from test_table where option includes ('option1', 'option2')";
Statement statement = TestUtils.assertSqlCanBeParsedAndDeparsed(sqlStr, true);
System.out.println(statement);
}

@Test
void testSOQLExcludes() throws JSQLParserException {
String sqlStr =
"select name,\ngoods from test_table where option excludes ('option1', 'option2')";
"select name,\ngoods from test_table where option excludes ('option1', 'option2')";
Statement statement = TestUtils.assertSqlCanBeParsedAndDeparsed(sqlStr, true);
System.out.println(statement);
}
Expand Down