@dbml/core 3.14.0 → 3.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/export/OracleExporter.js +11 -7
- package/package.json +3 -3
|
@@ -80,6 +80,17 @@ var OracleExporter = /*#__PURE__*/function () {
|
|
|
80
80
|
cloneField.dbdefault = null;
|
|
81
81
|
cloneField.not_null = false;
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
// default value must be placed before the inline constraint expression
|
|
85
|
+
// See column definition syntax https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-TABLE.html#GUID-F9CE0CC3-13AE-4744-A43C-EAC7A71AAAB6__CEGEDHJE
|
|
86
|
+
// See constraint syntax https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/constraint.html#GUID-1055EA97-BA6F-4764-A15F-1024FD5B6DFE__CJAEDFIB
|
|
87
|
+
if (cloneField.dbdefault) {
|
|
88
|
+
if (cloneField.dbdefault.type === 'string') {
|
|
89
|
+
line += " DEFAULT '".concat(cloneField.dbdefault.value, "'");
|
|
90
|
+
} else {
|
|
91
|
+
line += " DEFAULT ".concat(cloneField.dbdefault.value);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
83
94
|
if (cloneField.unique) {
|
|
84
95
|
line += ' UNIQUE';
|
|
85
96
|
}
|
|
@@ -89,13 +100,6 @@ var OracleExporter = /*#__PURE__*/function () {
|
|
|
89
100
|
if (cloneField.not_null) {
|
|
90
101
|
line += ' NOT NULL';
|
|
91
102
|
}
|
|
92
|
-
if (cloneField.dbdefault) {
|
|
93
|
-
if (cloneField.dbdefault.type === 'string') {
|
|
94
|
-
line += " DEFAULT '".concat(cloneField.dbdefault.value, "'");
|
|
95
|
-
} else {
|
|
96
|
-
line += " DEFAULT ".concat(cloneField.dbdefault.value);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
103
|
return line;
|
|
100
104
|
});
|
|
101
105
|
return lines;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dbml/core",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.1",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Holistics <dev@holistics.io>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prepublish": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@dbml/parse": "^3.14.
|
|
35
|
+
"@dbml/parse": "^3.14.1",
|
|
36
36
|
"antlr4": "^4.13.1",
|
|
37
37
|
"lodash": "^4.17.15",
|
|
38
38
|
"parsimmon": "^1.13.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"^lodash-es$": "lodash"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "c7115d0a118426cc8d9ff4dcf25e8cfaae4544f5",
|
|
66
66
|
"engines": {
|
|
67
67
|
"node": ">=16"
|
|
68
68
|
}
|