Skip to content

Commit 27cb7c7

Browse files
authored
🤖 Merge PR DefinitelyTyped#71458 [@types/oracledb] Add privilege property for createPool API by @sudarshan12s
1 parent 9a869f9 commit 27cb7c7

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

‎types/oracledb/index.d.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2965,6 +2965,15 @@ declare namespace OracleDB {
29652965
* Statistics can be output to the console by calling the pool.logStatistics() method.
29662966
*/
29672967
enableStatistics?: boolean | undefined;
2968+
/**
2969+
* The privilege to use when establishing connection to the database.
2970+
* This optional property should be one of the privileged connection constants.
2971+
* For Thin mode only, privilege is applicable in createPool. Thick mode
2972+
* still needs to pass it in pool.getConnection.
2973+
*
2974+
* @since 6.5.1
2975+
*/
2976+
privilege?: number | undefined;
29682977
}
29692978

29702979
/**

‎types/oracledb/oracledb-tests.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,4 +710,20 @@ export const version6Tests = async (): Promise<void> => {
710710
// by DB for SODA document.
711711
const key = new oracledb.JsonId([102, 241, 117, 85, 174, 103, 204, 25, 15, 172, 252, 47]);
712712
console.log(key.toJSON()); // 66f17555ae67cc190facfc2f
713+
714+
console.log("Testing createPool() with privilege parameter applicable for Thin mode...");
715+
716+
await oracledb.createPool({
717+
connectString: DB_CONNECTION_STRING,
718+
privilege: oracledb.SYSDBA,
719+
homogeneous: true,
720+
password: DB_PASSWORD,
721+
poolIncrement: 1,
722+
poolMax: 5,
723+
poolMin: 3,
724+
poolPingInterval: 60,
725+
poolTimeout: 60,
726+
queueTimeout: 60000,
727+
user: DB_USER,
728+
});
713729
};

0 commit comments

Comments
 (0)