Repository navigation
Commit 2d6b193
committed
feat: parse Oracle RAW(n) and NUMBER(*, s) data types
DDL exported from Oracle with DBMS_METADATA.GET_DDL prints an INTEGER
column as NUMBER(*,0) and binary columns as RAW(16). CREATE TABLE and
ALTER TABLE with such columns failed to parse, and so did
CAST(x AS NUMBER(*,0)) and CAST(x AS RAW(16)).
RAW is a keyword token, so ColDataType did not accept it as a type name.
NUMBER(*, s) now takes the same path as NUMBER(p, s): DataType() accepts
* in its precision slot for NUMBER only, and ColDataType folds it into
the type name as "NUMBER (*, 0)" with a null precision and the scale
set. NUMBER(*, *) and VARCHAR(*) stay rejected.1 parent a075737 commit 2d6b193
3 files changed
Lines changed: 40 additions & 6 deletions
File tree
- src
- main
- java/net/sf/jsqlparser/statement/create/table
- jjtree/net/sf/jsqlparser/parser
- test/java/net/sf/jsqlparser/statement/create/table
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
| 107 | + | |
107 | 108 | | |
108 | | - | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
333 | | - | |
334 | | - | |
335 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
336 | 338 | | |
337 | 339 | | |
338 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18902 | 18902 | | |
18903 | 18903 | | |
18904 | 18904 | | |
18905 | | - | |
| 18905 | + | |
| 18906 | + | |
| 18907 | + | |
| 18908 | + | |
18906 | 18909 | | |
18907 | 18910 | | |
18908 | 18911 | | |
| |||
19045 | 19048 | | |
19046 | 19049 | | |
19047 | 19050 | | |
| 19051 | + | |
| 19052 | + | |
19048 | 19053 | | |
19049 | 19054 | | |
19050 | 19055 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
150 | 177 | | |
151 | 178 | | |
152 | 179 | | |
| |||
0 commit comments