Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#71458 [@types/oracledb] Add privilege prop…
Browse files Browse the repository at this point in the history
…erty for createPool API by @sudarshan12s
  • Loading branch information
sudarshan12s authored Dec 21, 2024
1 parent 9a869f9 commit 27cb7c7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions types/oracledb/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2965,6 +2965,15 @@ declare namespace OracleDB {
* Statistics can be output to the console by calling the pool.logStatistics() method.
*/
enableStatistics?: boolean | undefined;
/**
* The privilege to use when establishing connection to the database.
* This optional property should be one of the privileged connection constants.
* For Thin mode only, privilege is applicable in createPool. Thick mode
* still needs to pass it in pool.getConnection.
*
* @since 6.5.1
*/
privilege?: number | undefined;
}

/**
Expand Down
16 changes: 16 additions & 0 deletions types/oracledb/oracledb-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -710,4 +710,20 @@ export const version6Tests = async (): Promise<void> => {
// by DB for SODA document.
const key = new oracledb.JsonId([102, 241, 117, 85, 174, 103, 204, 25, 15, 172, 252, 47]);
console.log(key.toJSON()); // 66f17555ae67cc190facfc2f

console.log("Testing createPool() with privilege parameter applicable for Thin mode...");

await oracledb.createPool({
connectString: DB_CONNECTION_STRING,
privilege: oracledb.SYSDBA,
homogeneous: true,
password: DB_PASSWORD,
poolIncrement: 1,
poolMax: 5,
poolMin: 3,
poolPingInterval: 60,
poolTimeout: 60,
queueTimeout: 60000,
user: DB_USER,
});
};

0 comments on commit 27cb7c7

Please sign in to comment.