@sqb/oracle-dialect 4.25.0 → 4.26.0
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/oracle-serializer.js +15 -14
- package/package.json +2 -2
package/oracle-serializer.js
CHANGED
|
@@ -33,18 +33,19 @@ export class OracleSerializer {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
_serializeSelect(ctx, o, defFn) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
o.
|
|
36
|
+
if (o.query._tables) {
|
|
37
|
+
let optimizerHint = '';
|
|
38
|
+
for (const t of o.query._tables) {
|
|
39
|
+
if (t._type === SerializationType.TABLE_NAME) {
|
|
40
|
+
if (!t.optimizerHint?.length)
|
|
41
|
+
continue;
|
|
42
|
+
const s = t.optimizerHint?.map(x => x.hint).join('\n');
|
|
43
|
+
optimizerHint +=
|
|
44
|
+
'/*+ ' + s.replace(/:table/gi, t.alias || t.table) + ' */';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
o.optimizerHint = optimizerHint;
|
|
48
|
+
}
|
|
48
49
|
let out = defFn(ctx, o);
|
|
49
50
|
const limit = o.limit || 0;
|
|
50
51
|
const offset = Math.max(o.offset || 0, 0);
|
|
@@ -81,8 +82,8 @@ export class OracleSerializer {
|
|
|
81
82
|
}
|
|
82
83
|
return out;
|
|
83
84
|
}
|
|
84
|
-
_serializeFrom(ctx,
|
|
85
|
-
return defFn(ctx,
|
|
85
|
+
_serializeFrom(ctx, arr, defFn) {
|
|
86
|
+
return defFn(ctx, arr) || 'from dual';
|
|
86
87
|
}
|
|
87
88
|
_serializeComparison(ctx, o, defFn) {
|
|
88
89
|
if (o.right &&
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqb/oracle-dialect",
|
|
3
3
|
"description": "SQB serialization extension for Oracle database",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.26.0",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"dependencies": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"tslib": "^2.8.1"
|
|
10
10
|
},
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"@sqb/builder": "^4.
|
|
12
|
+
"@sqb/builder": "^4.26.0"
|
|
13
13
|
},
|
|
14
14
|
"type": "module",
|
|
15
15
|
"module": "./index.js",
|