@pi-r/mariadb 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.
Files changed (2) hide show
  1. package/client/index.js +2 -3
  2. package/package.json +3 -3
package/client/index.js CHANGED
@@ -247,10 +247,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
247
247
  continue;
248
248
  }
249
249
  item.transactionState = 1 /* DB_TRANSACTION.ACTIVE */;
250
- const renewCache = ignoreCache === 0;
251
- const cacheValue = renewCache ? { sessionKey, renewCache } : sessionKey;
250
+ const cacheValue = ignoreCache === undefined ? sessionKey : Array.isArray(ignoreCache) ? { sessionKey, exclusiveOf: ignoreCache } : { sessionKey, renewCache: ignoreCache === 0 };
252
251
  let queryString = '';
253
- if ((caching && ignoreCache !== true || ignoreCache === false || ignoreCache === 1 || renewCache) && !streamRow) {
252
+ if (caching && ignoreCache !== true && !streamRow) {
254
253
  queryString = Db.asString(query, true) + '_' + Db.asString(params, true);
255
254
  const result = this.getQueryResult(source, removePoolProperties(credential), queryString, cacheValue);
256
255
  if (ignoreCache !== 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/mariadb",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "MariaDB 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
  "mariadb": "^3.2.3"
27
27
  }
28
28
  }