@sqb/oracle 4.23.1 → 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.
@@ -14,6 +14,7 @@ export declare class OraConnection implements Adapter.Connection {
14
14
  test(): Promise<void>;
15
15
  getSchema(): Promise<string>;
16
16
  setSchema(schema: string): Promise<void>;
17
+ getInTransaction(): boolean;
17
18
  onGenerateQuery(prepared: QueryRequest): void;
18
19
  execute(request: QueryRequest): Promise<Adapter.Response>;
19
20
  }
package/ora-connection.js CHANGED
@@ -53,6 +53,9 @@ export class OraConnection {
53
53
  assert.ok(this.intlcon, 'Can not set schema of a closed db session');
54
54
  await this.intlcon.execute('alter SESSION set CURRENT_SCHEMA = ' + schema, [], { autoCommit: true });
55
55
  }
56
+ getInTransaction() {
57
+ return this._inTransaction;
58
+ }
56
59
  onGenerateQuery(prepared) {
57
60
  prepared.dialect = 'oracle';
58
61
  prepared.dialectVersion = this.serverVersion;
@@ -71,29 +74,6 @@ export class OraConnection {
71
74
  else
72
75
  oraOptions.maxRows = request.fetchRows;
73
76
  const out = {};
74
- const params = request.params;
75
- const wrapDate = (v) => {
76
- if (v instanceof Date)
77
- return {
78
- type: oracledb.DB_TYPE_DATE,
79
- dir: oracledb.BIND_IN,
80
- value: v,
81
- };
82
- if (v.value instanceof Date)
83
- v.type = oracledb.DB_TYPE_DATE;
84
- return v;
85
- };
86
- if (params && typeof params === 'object') {
87
- if (Array.isArray(params)) {
88
- params.forEach((v, i) => {
89
- params[i] = wrapDate(v);
90
- });
91
- }
92
- else
93
- Object.keys(params).forEach(k => {
94
- params[k] = wrapDate(params[k]);
95
- });
96
- }
97
77
  this.intlcon.action = request.action || '';
98
78
  let response = await this.intlcon.execute(request.sql, request.params || [], oraOptions);
99
79
  if (response.rowsAffected)
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@sqb/oracle",
3
3
  "description": "SQB serialization extension for Oracle database",
4
- "version": "4.23.1",
4
+ "version": "4.24.1",
5
5
  "author": "Panates",
6
6
  "license": "Apache-2.0",
7
7
  "dependencies": {
8
8
  "tslib": "^2.8.1"
9
9
  },
10
10
  "peerDependencies": {
11
- "@sqb/builder": "^4.23.1",
12
- "@sqb/connect": "^4.23.1",
13
- "@sqb/oracle-dialect": "^4.23.1",
11
+ "@sqb/builder": "^4.24.1",
12
+ "@sqb/connect": "^4.24.1",
13
+ "@sqb/oracle-dialect": "^4.24.1",
14
14
  "oracledb": ">= 6.4.0"
15
15
  },
16
16
  "type": "module",