@e-mc/db 0.12.2 → 0.12.3

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/README.md CHANGED
@@ -34,7 +34,7 @@ interface IDb extends IClientDb<IHost, DbModule, DbDataSource, DbSourceOptions,
34
34
  executeBatchQuery(batch: DbDataSource[], sessionKey: string, outResult?: BatchQueryResult): Promise<BatchQueryResult>;
35
35
  executeBatchQuery(batch: DbDataSource[], options?: ExecuteBatchQueryOptions | string, outResult?: BatchQueryResult): Promise<BatchQueryResult>;
36
36
  processRows(batch: DbDataSource[], tasks: Promise<QueryResult | null>[], parallel: boolean): Promise<BatchQueryResult>;
37
- processRows(batch: DbDataSource[], tasks: Promise<QueryResult | null>[], options?: ProcessRowsOptions, outResult?: BatchQueryResult): Promise<BatchQueryResult>;
37
+ processRows(batch: DbDataSource[], tasks: Promise<QueryResult | null>[], options?: ProcessRowsOptions | boolean, outResult?: BatchQueryResult): Promise<BatchQueryResult>;
38
38
  handleFail(err: unknown, item: DbDataSource, options?: HandleFailOptions): boolean;
39
39
  readTLSCert(value: unknown, cache?: boolean): string;
40
40
  readTLSConfig(options: SecureContextOptions, cache?: boolean): void;
package/index.js CHANGED
@@ -269,6 +269,7 @@ class Db extends core_1.ClientDb {
269
269
  result.queue_max ??= config.queue_max;
270
270
  result.queue_idle ??= config.queue_idle;
271
271
  result.timeout ??= config.timeout;
272
+ result.server_timeout ??= config.server_timeout;
272
273
  result.socket_timeout ??= config.socket_timeout;
273
274
  }
274
275
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/db",
3
- "version": "0.12.2",
3
+ "version": "0.12.3",
4
4
  "description": "DB modules for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,8 +20,8 @@
20
20
  "license": "BSD-3-Clause",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/core": "0.12.2",
24
- "@e-mc/request": "0.12.2",
25
- "@e-mc/types": "0.12.2"
23
+ "@e-mc/core": "0.12.3",
24
+ "@e-mc/request": "0.12.3",
25
+ "@e-mc/types": "0.12.3"
26
26
  }
27
27
  }
package/pool.js CHANGED
@@ -12,13 +12,16 @@ class DbPool {
12
12
  return crypto.randomUUID();
13
13
  }
14
14
  static canCache(credential) {
15
+ if (credential.uuidKey) {
16
+ return true;
17
+ }
15
18
  const properties = this.CACHE_IGNORE;
16
19
  for (let i = 0, length = properties.length; i < length; ++i) {
17
20
  if (credential[properties[i]] !== undefined) {
18
- return true;
21
+ return false;
19
22
  }
20
23
  }
21
- return false;
24
+ return true;
22
25
  }
23
26
  static sanitize(credential) {
24
27
  const properties = this.CACHE_UNUSED;