Commit daea33e
Add ability to support "NOT LIKE ..." expressions (#539)
The parser is able to parse expressions such as "a NOT LIKE '%pattern%'", but is not able to parse expressions where the not is before the entire expression. For example: "NOT a LIKE '%pattern%'.
When parsing the latter, the error is:
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered " "LIKE" "LIKE "" at line 1, column 32.
Was expecting one of: ...
The reason this is important is both because these syntaxes are both valid, and also because the deparser uses the second method.
Therefore, if you parse a query with the first type of expression, then deparse it and parse again, you'll get the same error.1 parent 452baff commit daea33e
2 files changed
Lines changed: 30 additions & 3 deletions
File tree
- src
- main/jjtree/net/sf/jsqlparser/parser
- test/java/net/sf/jsqlparser/test/select
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2084 | 2084 | | |
2085 | 2085 | | |
2086 | 2086 | | |
2087 | | - | |
2088 | | - | |
2089 | | - | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
2090 | 2099 | | |
2091 | 2100 | | |
2092 | 2101 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1192 | 1192 | | |
1193 | 1193 | | |
1194 | 1194 | | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1195 | 1213 | | |
1196 | 1214 | | |
1197 | 1215 | | |
| |||
0 commit comments