@pi-r/oracle 0.8.1 → 0.8.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 +6 -6
- package/client/index.d.ts +13 -13
- package/client/pool.d.ts +8 -8
- package/client/pool.js +1 -1
- package/package.json +28 -28
- package/types/index.d.ts +20 -20
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
### @pi-r/oracle
|
|
2
|
-
|
|
3
|
-
https://e-mc.readthedocs.io/en/latest/db/oracle.html
|
|
4
|
-
|
|
5
|
-
### LICENSE
|
|
6
|
-
|
|
1
|
+
### @pi-r/oracle
|
|
2
|
+
|
|
3
|
+
https://e-mc.readthedocs.io/en/latest/db/oracle.html
|
|
4
|
+
|
|
5
|
+
### LICENSE
|
|
6
|
+
|
|
7
7
|
MIT
|
package/client/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { IModule } from '@e-mc/types/lib';
|
|
2
|
-
import type { LogType } from '@e-mc/types/lib/logger';
|
|
3
|
-
import type { IDbSourceClient } from '@e-mc/db/types';
|
|
4
|
-
|
|
5
|
-
import type { OracleDataSource } from '../types';
|
|
6
|
-
|
|
7
|
-
import type { InitialiseOptions } from 'oracledb';
|
|
8
|
-
|
|
9
|
-
declare const Oracle: IDbSourceClient<OracleDataSource> & {
|
|
10
|
-
initOracleClient(this: IModule, credential: InitialiseOptions, type?: LogType): void;
|
|
11
|
-
getConfigObject(value: Undef<string>): string;
|
|
12
|
-
};
|
|
13
|
-
|
|
1
|
+
import type { IModule } from '@e-mc/types/lib';
|
|
2
|
+
import type { LogType } from '@e-mc/types/lib/logger';
|
|
3
|
+
import type { IDbSourceClient } from '@e-mc/db/types';
|
|
4
|
+
|
|
5
|
+
import type { OracleDataSource } from '../types';
|
|
6
|
+
|
|
7
|
+
import type { InitialiseOptions } from 'oracledb';
|
|
8
|
+
|
|
9
|
+
declare const Oracle: IDbSourceClient<OracleDataSource> & {
|
|
10
|
+
initOracleClient(this: IModule, credential: InitialiseOptions, type?: LogType): void;
|
|
11
|
+
getConfigObject(value: Undef<string>): string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
14
|
export = Oracle;
|
package/client/pool.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { DbPoolConstructor } from '@e-mc/types/lib/db';
|
|
2
|
-
|
|
3
|
-
import type { DbPoolCredential, OracleDataSource } from '../types';
|
|
4
|
-
|
|
5
|
-
import type { Pool } from 'oracledb';
|
|
6
|
-
|
|
7
|
-
declare const OraclePool: DbPoolConstructor<OracleDataSource, Pool, unknown, DbPoolCredential>;
|
|
8
|
-
|
|
1
|
+
import type { DbPoolConstructor } from '@e-mc/types/lib/db';
|
|
2
|
+
|
|
3
|
+
import type { DbPoolCredential, OracleDataSource } from '../types';
|
|
4
|
+
|
|
5
|
+
import type { Pool } from 'oracledb';
|
|
6
|
+
|
|
7
|
+
declare const OraclePool: DbPoolConstructor<OracleDataSource, Pool, unknown, DbPoolCredential>;
|
|
8
|
+
|
|
9
9
|
export = OraclePool;
|
package/client/pool.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
const DbPool = require('@e-mc/db/pool');
|
|
3
3
|
const POOL_ACTIVE = new WeakSet();
|
|
4
4
|
class OraclePool extends DbPool {
|
|
5
|
-
static CACHE_UNUSED = ['connectTimeout', 'transportConnectTimeout', 'expireTime', 'poolMax', 'poolMin', 'poolIncrement', 'poolTimeout', 'poolPingInterval', 'poolMaxPerShard', 'queueMax', 'queueRequests', 'queueTimeout', 'enableStatistics', 'sodaMetaDataCache', 'stmtCacheSize'];
|
|
6
5
|
static asString(credential) {
|
|
7
6
|
if (credential.connectString && (credential.user && credential.password || credential.externalAuth) || credential.poolAlias) {
|
|
8
7
|
return JSON.stringify(this.removeUUIDKey(credential));
|
|
@@ -47,4 +46,5 @@ class OraclePool extends DbPool {
|
|
|
47
46
|
return this.client.status === 6002;
|
|
48
47
|
}
|
|
49
48
|
}
|
|
49
|
+
OraclePool.CACHE_UNUSED = ['connectTimeout', 'transportConnectTimeout', 'expireTime', 'poolMax', 'poolMin', 'poolIncrement', 'poolTimeout', 'poolPingInterval', 'poolMaxPerShard', 'queueMax', 'queueRequests', 'queueTimeout', 'enableStatistics', 'sodaMetaDataCache', 'stmtCacheSize'];
|
|
50
50
|
module.exports = OraclePool;
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pi-r/oracle",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "Oracle client driver for E-mc.",
|
|
5
|
-
"main": "client/index.js",
|
|
6
|
-
"types": "client/index.d.ts",
|
|
7
|
-
"publishConfig": {
|
|
8
|
-
"access": "public"
|
|
9
|
-
},
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/anpham6/pi-r.git",
|
|
13
|
-
"directory": "src/db/oracle"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"squared",
|
|
17
|
-
"e-mc",
|
|
18
|
-
"squared-functions"
|
|
19
|
-
],
|
|
20
|
-
"author": "An Pham <anpham6@gmail.com>",
|
|
21
|
-
"license": "MIT",
|
|
22
|
-
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@e-mc/db": "^0.10.
|
|
25
|
-
"@e-mc/types": "^0.10.
|
|
26
|
-
"oracledb": "^6.6.0"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@pi-r/oracle",
|
|
3
|
+
"version": "0.8.3",
|
|
4
|
+
"description": "Oracle client driver for E-mc.",
|
|
5
|
+
"main": "client/index.js",
|
|
6
|
+
"types": "client/index.d.ts",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/anpham6/pi-r.git",
|
|
13
|
+
"directory": "src/db/oracle"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"squared",
|
|
17
|
+
"e-mc",
|
|
18
|
+
"squared-functions"
|
|
19
|
+
],
|
|
20
|
+
"author": "An Pham <anpham6@gmail.com>",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@e-mc/db": "^0.10.3",
|
|
25
|
+
"@e-mc/types": "^0.10.3",
|
|
26
|
+
"oracledb": "^6.6.0"
|
|
27
|
+
}
|
|
28
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import type { DbDataSource } from '@e-mc/types/lib/squared';
|
|
2
|
-
|
|
3
|
-
import type { IdentifierAction } from '@e-mc/types/lib/core';
|
|
4
|
-
import type { ExecuteAction, ServerAuth } from '@e-mc/types/lib/db';
|
|
5
|
-
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
import type { BindParameters, ConnectionAttributes, ExecuteOptions, InitialiseOptions, PoolAttributes } from 'oracledb';
|
|
8
|
-
|
|
9
|
-
export const enum POOL_STATUS {
|
|
10
|
-
CLOSED = 6002,
|
|
11
|
-
DRAINING = 6001,
|
|
12
|
-
OPEN = 6000,
|
|
13
|
-
RECONFIGURING = 6003
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface OracleDataSource extends DbDataSource<string, ExecuteOptions, unknown, OracleCredential, string>, ExecuteAction<BindParameters> {
|
|
17
|
-
source: "oracle";
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type OracleCredential = ConnectionAttributes & PoolAttributes & InitialiseOptions & ServerAuth;
|
|
1
|
+
import type { DbDataSource } from '@e-mc/types/lib/squared';
|
|
2
|
+
|
|
3
|
+
import type { IdentifierAction } from '@e-mc/types/lib/core';
|
|
4
|
+
import type { ExecuteAction, ServerAuth } from '@e-mc/types/lib/db';
|
|
5
|
+
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import type { BindParameters, ConnectionAttributes, ExecuteOptions, InitialiseOptions, PoolAttributes } from 'oracledb';
|
|
8
|
+
|
|
9
|
+
export const enum POOL_STATUS {
|
|
10
|
+
CLOSED = 6002,
|
|
11
|
+
DRAINING = 6001,
|
|
12
|
+
OPEN = 6000,
|
|
13
|
+
RECONFIGURING = 6003
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface OracleDataSource extends DbDataSource<string, ExecuteOptions, unknown, OracleCredential, string>, ExecuteAction<BindParameters> {
|
|
17
|
+
source: "oracle";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type OracleCredential = ConnectionAttributes & PoolAttributes & InitialiseOptions & ServerAuth;
|
|
21
21
|
export type DbPoolCredential = PoolAttributes & IdentifierAction;
|