@e-mc/db 0.8.19 → 0.8.21

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2024 An Pham
1
+ Copyright 2023 An Pham
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- - https://www.unpkg.com/@e-mc/types@0.8.19/lib/index.d.ts
12
+ - https://www.unpkg.com/@e-mc/types@0.8.21/lib/index.d.ts
13
13
 
14
14
  ```typescript
15
15
  import type { DbDataSource } from "./squared";
@@ -94,11 +94,11 @@ interface DbPoolConstructor {
94
94
 
95
95
  ## References
96
96
 
97
- - https://www.unpkg.com/@e-mc/types@0.8.19/lib/squared.d.ts
98
- - https://www.unpkg.com/@e-mc/types@0.8.19/lib/core.d.ts
99
- - https://www.unpkg.com/@e-mc/types@0.8.19/lib/db.d.ts
100
- - https://www.unpkg.com/@e-mc/types@0.8.19/lib/object.d.ts
101
- - https://www.unpkg.com/@e-mc/types@0.8.19/lib/settings.d.ts
97
+ - https://www.unpkg.com/@e-mc/types@0.8.21/lib/squared.d.ts
98
+ - https://www.unpkg.com/@e-mc/types@0.8.21/lib/core.d.ts
99
+ - https://www.unpkg.com/@e-mc/types@0.8.21/lib/db.d.ts
100
+ - https://www.unpkg.com/@e-mc/types@0.8.21/lib/object.d.ts
101
+ - https://www.unpkg.com/@e-mc/types@0.8.21/lib/settings.d.ts
102
102
 
103
103
  ## LICENSE
104
104
 
package/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const path = require("path");
4
- const types_1 = require("@e-mc/types");
5
4
  const core_1 = require("@e-mc/core");
6
5
  const request_1 = require("@e-mc/request");
6
+ const types_1 = require("@e-mc/types");
7
7
  const util_1 = require("@e-mc/db/util");
8
8
  const DB_CLIENT = new Map();
9
9
  const POOL_CONFIG = new Map();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/db",
3
- "version": "0.8.19",
3
+ "version": "0.8.21",
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": "MIT",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/core": "0.8.19",
24
- "@e-mc/request": "0.8.19",
25
- "@e-mc/types": "0.8.19"
23
+ "@e-mc/core": "0.8.21",
24
+ "@e-mc/request": "0.8.21",
25
+ "@e-mc/types": "0.8.21"
26
26
  }
27
27
  }
package/types/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import type { DbDataSource } from '@e-mc/types/lib/squared';
2
-
3
- import type { IDb } from '@e-mc/types/lib';
4
- import type { BatchQueryResult, ExecuteBatchQueryOptions, ExecuteQueryOptions, QueryResult } from '@e-mc/types/lib/db';
5
-
6
- export interface IDbSourceClient<T extends DbDataSource = DbDataSource> {
7
- DB_SOURCE_NAME: string;
8
- DB_SOURCE_CLIENT: boolean;
9
- DB_SOURCE_TYPE: number;
10
- setCredential(this: IDb, item: T): Promise<void>;
11
- executeQuery(this: IDb, item: T, options?: ExecuteQueryOptions | string): Promise<QueryResult>;
12
- executeBatchQuery(this: IDb, batch: T[], options?: ExecuteBatchQueryOptions | string, outResult?: BatchQueryResult): Promise<BatchQueryResult>;
13
- checkTimeout?(this: IDbSourceClient, value: number, limit?: number): Promise<number>;
1
+ import type { DbDataSource } from '@e-mc/types/lib/squared';
2
+
3
+ import type { IDb } from '@e-mc/types/lib';
4
+ import type { BatchQueryResult, ExecuteBatchQueryOptions, ExecuteQueryOptions, QueryResult } from '@e-mc/types/lib/db';
5
+
6
+ export interface IDbSourceClient<T extends DbDataSource = DbDataSource> {
7
+ DB_SOURCE_NAME: string;
8
+ DB_SOURCE_CLIENT: boolean;
9
+ DB_SOURCE_TYPE: number;
10
+ setCredential(this: IDb, item: T): Promise<void>;
11
+ executeQuery(this: IDb, item: T, options?: ExecuteQueryOptions | string): Promise<QueryResult>;
12
+ executeBatchQuery(this: IDb, batch: T[], options?: ExecuteBatchQueryOptions | string, outResult?: BatchQueryResult): Promise<BatchQueryResult>;
13
+ checkTimeout?(this: IDbSourceClient, value: number, limit?: number): Promise<number>;
14
14
  }