@pi-r/oci 0.12.4 → 0.13.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.
Files changed (2) hide show
  1. package/client/index.js +4 -4
  2. package/package.json +7 -7
package/client/index.js CHANGED
@@ -80,7 +80,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
80
80
  const item = batch[i];
81
81
  const { service, table = '', id, query, updateType = 0, ignoreCache } = item;
82
82
  cacheValue.exclusiveOf = Array.isArray(ignoreCache) ? ignoreCache : undefined;
83
- let rows, update = item.update, queryString = caching && ignoreCache !== true ? table + '_' : '';
83
+ let rows, update = item.update, queryString = caching && ignoreCache !== true ? table : '';
84
84
  if (Array.isArray(update) || update && updateType === 3) {
85
85
  db ||= await createSoda();
86
86
  const col = await db.createCollection(table);
@@ -99,7 +99,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
99
99
  throw formatError(item, "Missing database table");
100
100
  }
101
101
  if (queryString) {
102
- queryString += id;
102
+ queryString = Cloud.keyForResult(queryString, id);
103
103
  if (!update && (rows = this.getCacheResult(service, credential, queryString, cacheValue, ignoreCache))) {
104
104
  result[i] = rows;
105
105
  continue;
@@ -166,7 +166,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
166
166
  closeClient();
167
167
  throw formatError(item, "Missing database table");
168
168
  }
169
- if (queryString && (rows = this.getCacheResult(service, credential, queryString += Cloud.asString(query, true) + '_' + (maxRows > 0 ? maxRows.toString() : '0'), cacheValue, ignoreCache))) {
169
+ if (queryString && (rows = this.getCacheResult(service, credential, queryString = Cloud.keyForResult(queryString, query, maxRows > 0 ? maxRows : 0), cacheValue, ignoreCache))) {
170
170
  result[i] = rows;
171
171
  continue;
172
172
  }
@@ -205,7 +205,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
205
205
  if (options?.maxRows && isNaN(maxRows)) {
206
206
  maxRows = options.maxRows;
207
207
  }
208
- if (queryString && (rows = this.getCacheResult(service, credential, queryString += query + Cloud.asString(params, true) + Cloud.asString(options, true) + (maxRows > 0 ? maxRows : ''), cacheValue, ignoreCache))) {
208
+ if (queryString && (rows = this.getCacheResult(service, credential, queryString = Cloud.keyForResult(queryString, query, maxRows > 0 ? maxRows : 0, params, options), cacheValue, ignoreCache))) {
209
209
  result[i] = rows;
210
210
  continue;
211
211
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/oci",
3
- "version": "0.12.4",
3
+ "version": "0.13.0",
4
4
  "description": "Oracle (OCI) cloud functions for E-mc.",
5
5
  "main": "client/index.js",
6
6
  "repository": {
@@ -16,12 +16,12 @@
16
16
  "license": "MIT",
17
17
  "homepage": "https://github.com/anpham6/pi-r#readme",
18
18
  "dependencies": {
19
- "@e-mc/cloud": "^0.14.5",
20
- "@e-mc/module": "^0.14.5",
21
- "@e-mc/types": "^0.14.5",
22
- "@pi-r/aws": "^0.12.4",
23
- "@pi-r/oracle": "^0.12.4",
19
+ "@e-mc/cloud": "^0.14.6",
20
+ "@e-mc/module": "^0.14.6",
21
+ "@e-mc/types": "^0.14.6",
22
+ "@pi-r/aws": "^0.13.0",
23
+ "@pi-r/oracle": "^0.13.0",
24
24
  "aws-sdk": "^2.1693.0",
25
- "oracledb": "^6.10.0"
25
+ "oracledb": "^7.0.1"
26
26
  }
27
27
  }