mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 19:59:02 +08:00
Merge pull request #17848 from pkeuter/mssql-pool-config
mssql: Extend generic-pool config options
This commit is contained in:
19
types/mssql/index.d.ts
vendored
19
types/mssql/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for mssql 4.0.2
|
||||
// Type definitions for mssql 4.0.4
|
||||
// Project: https://www.npmjs.com/package/mssql
|
||||
// Definitions by: COLSA Corporation <http://www.colsa.com/>, Ben Farr <https://github.com/jaminfarr>, Vitor Buzinaro <https://github.com/buzinas>, Matt Richardson <https://github.com/mrrichar/>, Jørgen Elgaard Larsen <https://github.com/elhaard/>, Peter Keuter <https://github.com/pkeuter/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -148,11 +148,20 @@ export interface IOptions {
|
||||
trustedConnection?: boolean;
|
||||
}
|
||||
|
||||
|
||||
export interface IPool {
|
||||
min: number;
|
||||
max: number;
|
||||
idleTimeoutMillis: number;
|
||||
min?: number;
|
||||
max?: number;
|
||||
idleTimeoutMillis?: number;
|
||||
maxWaitingClients?: number;
|
||||
testOnBorrow?: boolean;
|
||||
acquireTimeoutMillis?: number;
|
||||
fifo?: boolean;
|
||||
priorityRange?: number;
|
||||
autostart?: boolean;
|
||||
evictionRunIntervalMillis?: number;
|
||||
numTestsPerRun?: number;
|
||||
softIdleTimeoutMillis?: number;
|
||||
Promise?: any;
|
||||
}
|
||||
|
||||
export declare var pool: IPool;
|
||||
|
||||
@@ -12,6 +12,9 @@ var config: sql.config = {
|
||||
connectionTimeout: 10000,
|
||||
options: {
|
||||
encrypt: true
|
||||
},
|
||||
pool: {
|
||||
autostart: true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user