File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
main/jjtree/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/statement/select Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */
140
140
| <K_ALL:"ALL">
141
141
| <K_ALTER:"ALTER">
142
142
| <K_AND:"AND">
143
+ | <K_AND_OPERATOR:"&&">
143
144
| <K_ANY:"ANY">
144
145
| <K_AS: "AS">
145
146
| <K_ASC:"ASC">
@@ -1985,7 +1986,7 @@ Expression AndExpression() :
1985
1986
{ result = left; }
1986
1987
1987
1988
(
1988
- <K_AND>
1989
+ ( <K_AND> | <K_AND_OPERATOR>)
1989
1990
(
1990
1991
LOOKAHEAD(Condition())
1991
1992
right=Condition()
Original file line number Diff line number Diff line change @@ -3166,4 +3166,11 @@ public void testSqlContainIsNullFunctionShouldBeParsed() throws JSQLParserExcept
3166
3166
public void testNestedCast () throws JSQLParserException {
3167
3167
assertSqlCanBeParsedAndDeparsed ("SELECT acolumn::bit (64)::bigint FROM mytable" );
3168
3168
}
3169
+
3170
+ @ Test
3171
+ public void testAndOperator () throws JSQLParserException {
3172
+ String stmt = "SELECT name from customers where name = 'John' && lastname = 'Doh'" ;
3173
+ Statement parsed = parserManager .parse (new StringReader (stmt ));
3174
+ assertStatementCanBeDeparsedAs (parsed , "SELECT name FROM customers WHERE name = 'John' AND lastname = 'Doh'" );
3175
+ }
3169
3176
}
You can’t perform that action at this time.
0 commit comments