Repository navigation
Commit 37e8e2d
committed
fix: return UnsupportedStatement for CREATE forms that no rule models
CREATE falls back to UnsupportedStatement only when no earlier
alternative claims the statement. CREATE TABLE and CREATE INDEX accept
any leading words as modifiers, so PostgreSQL statements such as CREATE
LANGUAGE, CREATE OPERATOR CLASS, CREATE DEFAULT CONVERSION or CREATE
TRANSFORM entered one of them and failed before the fallback, and
parseStatements failed for the whole script.
Take the fallback first when the statement contains none of TABLE,
INDEX, VIEW and POLICY, which every remaining alternative needs, so
statements that parse today keep their result. The fallback also keeps
OR REPLACE, which Create() reads before choosing an alternative.
Signed-off-by: minleejae <mmj9808@gmail.com>1 parent 5d07ba4 commit 37e8e2d
3 files changed
Lines changed: 73 additions & 6 deletions
File tree
- src
- main/jjtree/net/sf/jsqlparser/parser
- test/java/net/sf/jsqlparser/statement
- create
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2838 | 2838 | | |
2839 | 2839 | | |
2840 | 2840 | | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
2841 | 2865 | | |
2842 | 2866 | | |
2843 | 2867 | | |
| |||
23579 | 23603 | | |
23580 | 23604 | | |
23581 | 23605 | | |
| 23606 | + | |
| 23607 | + | |
| 23608 | + | |
23582 | 23609 | | |
23583 | 23610 | | |
23584 | 23611 | | |
| |||
23592 | 23619 | | |
23593 | 23620 | | |
23594 | 23621 | | |
23595 | | - | |
23596 | | - | |
23597 | | - | |
| 23622 | + | |
23598 | 23623 | | |
23599 | 23624 | | |
23600 | 23625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| 34 | + | |
| 35 | + | |
28 | 36 | | |
29 | 37 | | |
30 | 38 | | |
| |||
196 | 204 | | |
197 | 205 | | |
198 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
199 | 240 | | |
200 | 241 | | |
201 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
0 commit comments