Repository navigation
Commit b392e4a
authored
fix: return UnsupportedStatement for CREATE forms that no rule models (#2864)
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 19a3585 commit b392e4a
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 | |
|---|---|---|---|
| |||
2836 | 2836 | | |
2837 | 2837 | | |
2838 | 2838 | | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
2839 | 2863 | | |
2840 | 2864 | | |
2841 | 2865 | | |
| |||
23605 | 23629 | | |
23606 | 23630 | | |
23607 | 23631 | | |
| 23632 | + | |
| 23633 | + | |
| 23634 | + | |
23608 | 23635 | | |
23609 | 23636 | | |
23610 | 23637 | | |
| |||
23618 | 23645 | | |
23619 | 23646 | | |
23620 | 23647 | | |
23621 | | - | |
23622 | | - | |
23623 | | - | |
| 23648 | + | |
23624 | 23649 | | |
23625 | 23650 | | |
23626 | 23651 | | |
| |||
| 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