@pi-r/oracle 0.6.0 → 0.6.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/client/index.js CHANGED
@@ -315,10 +315,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
315
315
  }
316
316
  item.transactionState = 1 /* DB_TRANSACTION.ACTIVE */;
317
317
  const streamRow = typeof item.streamRow === 'string' ? this.hasCoerce("oracle" /* STRINGS.MODULE_NAME */, 'options', null, credential) && (0, types_1.asFunction)(item.streamRow) : item.streamRow;
318
- const renewCache = ignoreCache === 0;
319
- const cacheValue = renewCache ? { sessionKey, renewCache } : sessionKey;
318
+ const cacheValue = ignoreCache === undefined ? sessionKey : Array.isArray(ignoreCache) ? { sessionKey, exclusiveOf: ignoreCache } : { sessionKey, renewCache: ignoreCache === 0 };
320
319
  let queryString = '';
321
- if ((caching && ignoreCache !== true || ignoreCache === false || ignoreCache === 1 || renewCache) && !streamRow) {
320
+ if (caching && ignoreCache !== true && !streamRow) {
322
321
  queryString = Db.asString(query, true) + '_' + Db.asString(params, true) + Db.asString(clientOptions, true);
323
322
  if (ignoreCache !== 1) {
324
323
  const result = this.getQueryResult(source, removePoolProperties(credential), queryString, cacheValue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/oracle",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Oracle client driver for E-mc.",
5
5
  "main": "client/index.js",
6
6
  "types": "client/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "license": "MIT",
22
22
  "homepage": "https://github.com/anpham6/pi-r#readme",
23
23
  "dependencies": {
24
- "@e-mc/db": "^0.8.0",
25
- "@e-mc/types": "^0.8.0",
24
+ "@e-mc/db": "^0.8.1",
25
+ "@e-mc/types": "^0.8.1",
26
26
  "oracledb": "^6.3.0"
27
27
  }
28
28
  }
package/types/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import type { DbDataSource } from '@e-mc/types/lib/squared';
2
2
 
3
3
  import type { ExecuteAction, ServerAuth } from '@e-mc/types/lib/db';
4
4
 
5
+ // @ts-ignore
5
6
  import type { BindParameters, ConnectionAttributes, ExecuteOptions, PoolAttributes, InitialiseOptions } from 'oracledb';
6
7
 
7
8
  export interface OracleDataSource extends DbDataSource<string, ExecuteOptions, unknown, string | OracleCredential, string>, ExecuteAction<BindParameters> {