Skip to content

Commit

Permalink
Merge branch '8'
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensby committed Aug 18, 2022
2 parents 54ad59b + c5c88b3 commit 484d6d5
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 46 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
v9.0.1 (2022-08-18)
-------------------
[fix] fix regression in requestTimout option not accepting `0` as a value ([#1421](https://github.com/tediousjs/node-mssql/pull/1421))

v9.0.0 (2022-08-10)
-------------------
[change] Upgrade tedious to v15 ([#1417](https://github.com/tediousjs/node-mssql/pull/1417))
[removed] Removed NodeJS 10 & 12 support ([#1417](https://github.com/tediousjs/node-mssql/pull/1417))

v8.1.4 (2022-08-18)
-------------------
[fix] fix regression in requestTimout option not accepting `0` as a value ([#1421](https://github.com/tediousjs/node-mssql/pull/1421))

v8.1.3 (2022-08-08)
-------------------
[fix] requestTimeout correctly resolved ([#1398](https://github.com/tediousjs/node-mssql/pull/1398))
Expand Down
4 changes: 2 additions & 2 deletions lib/msnodesqlv8/connection-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ class ConnectionPool extends BaseConnectionPool {
defaultConnectionString = CONNECTION_STRING_NAMED_INSTANCE
}

this.config.requestTimeout = this.config.requestTimeout || this.config.timeout || 15000
this.config.requestTimeout = this.config.requestTimeout ?? this.config.timeout ?? 15000

const cfg = {
conn_str: this.config.connectionString || defaultConnectionString,
conn_timeout: (this.config.connectionTimeout || this.config.timeout || 15000) / 1000
conn_timeout: (this.config.connectionTimeout ?? this.config.timeout ?? 15000) / 1000
}

cfg.conn_str = cfg.conn_str.replace(/#{([^}]*)}/g, (p) => {
Expand Down
4 changes: 2 additions & 2 deletions lib/tedious/connection-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class ConnectionPool extends BaseConnectionPool {

cfg.options.database = cfg.options.database || this.config.database
cfg.options.port = cfg.options.port || this.config.port
cfg.options.connectTimeout = cfg.options.connectTimeout || this.config.connectionTimeout || this.config.timeout || 15000
cfg.options.requestTimeout = cfg.options.requestTimeout || this.config.requestTimeout || this.config.timeout || 15000
cfg.options.connectTimeout = cfg.options.connectTimeout ?? this.config.connectionTimeout ?? this.config.timeout ?? 15000
cfg.options.requestTimeout = cfg.options.requestTimeout ?? this.config.requestTimeout ?? this.config.timeout ?? 15000
cfg.options.tdsVersion = cfg.options.tdsVersion || '7_4'
cfg.options.rowCollectionOnDone = cfg.options.rowCollectionOnDone || false
cfg.options.rowCollectionOnRequestCompletion = cfg.options.rowCollectionOnRequestCompletion || false
Expand Down
84 changes: 42 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 484d6d5

Please sign in to comment.