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