Repository navigation
Commit 83f9066
authored
feat: parse Oracle RAW(n) and NUMBER(*, s) data types (#2875)
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 4b983b2 commit 83f9066
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 | |
|---|---|---|---|
| |||
18924 | 18924 | | |
18925 | 18925 | | |
18926 | 18926 | | |
18927 | | - | |
| 18927 | + | |
| 18928 | + | |
| 18929 | + | |
| 18930 | + | |
18928 | 18931 | | |
18929 | 18932 | | |
18930 | 18933 | | |
| |||
19067 | 19070 | | |
19068 | 19071 | | |
19069 | 19072 | | |
| 19073 | + | |
| 19074 | + | |
19070 | 19075 | | |
19071 | 19076 | | |
19072 | 19077 | | |
| |||
| 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