@sqb/oracle-dialect 4.23.3 → 4.24.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.
@@ -173,11 +173,14 @@ export class OracleSerializer {
173
173
  return '';
174
174
  }
175
175
  _serializeParameter(ctx, o, defFn) {
176
- const v = ctx.params?.[o.name];
177
- if (v instanceof Date) {
178
- ctx.preparedParams = ctx.preparedParams || {};
179
- ctx.preparedParams[o.name] = toDateString(v).replace('T', ' ');
180
- return `TO_DATE(:${o.name}, 'yyyy-mm-dd hh24:mi:ss.SSSSS')`;
176
+ if (ctx.rootQuery._type === SerializationType.SELECT_QUERY ||
177
+ ctx.rootQuery._type === SerializationType.DELETE_QUERY) {
178
+ const v = ctx.params?.[o.name];
179
+ if (v instanceof Date) {
180
+ ctx.preparedParams = ctx.preparedParams || {};
181
+ ctx.preparedParams[o.name] = toDateString(v).replace('T', ' ');
182
+ return `TO_DATE(:${o.name}, 'yyyy-mm-dd hh24:mi:ss.SSSSS')`;
183
+ }
181
184
  }
182
185
  return defFn(ctx, o);
183
186
  }
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.23.3",
4
+ "version": "4.24.1",
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.23.3"
12
+ "@sqb/builder": "^4.24.1"
13
13
  },
14
14
  "type": "module",
15
15
  "module": "./index.js",