Merge pull request #17848 from pkeuter/mssql-pool-config

mssql: Extend generic-pool config options
This commit is contained in:
Ryan Cavanaugh
2017-07-13 12:53:10 -07:00
committed by GitHub
2 changed files with 17 additions and 5 deletions

View File

@@ -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;

View File

@@ -12,6 +12,9 @@ var config: sql.config = {
connectionTimeout: 10000,
options: {
encrypt: true
},
pool: {
autostart: true
}
}