mssql 9.0.0 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -1,22 +1,22 @@
1
- MIT License
2
-
3
- Copyright (c) 2013-2018 Patrik Simek and contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
1
+ MIT License
2
+
3
+ Copyright (c) 2013-2018 Patrik Simek and contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md CHANGED
@@ -437,7 +437,7 @@ Then the route uses the connection pool in the `app.locals` object:
437
437
  const sql = require('mssql');
438
438
 
439
439
  module.exports = function(req, res) {
440
- req.locals.db.query('SELECT TOP 10 * FROM table_name', function(err, recordset) {
440
+ req.app.locals.db.query('SELECT TOP 10 * FROM table_name', function(err, recordset) {
441
441
  if (err) {
442
442
  console.error(err)
443
443
  res.status(500).send('SERVER ERROR')
@@ -571,12 +571,36 @@ Complete list of pool options can be found [here](https://github.com/vincit/tarn
571
571
  In addition to configuration object there is an option to pass config as a connection string. Connection strings are supported.
572
572
 
573
573
  ##### Classic Connection String
574
+ ###### Standard configuration using tedious driver
574
575
 
575
576
  ```
576
577
  Server=localhost,1433;Database=database;User Id=username;Password=password;Encrypt=true
578
+ ```
579
+ ###### Standard configuration using msnodesqlv8 driver
580
+ ```
577
581
  Driver=msnodesqlv8;Server=(local)\INSTANCE;Database=database;UID=DOMAIN\username;PWD=password;Encrypt=true
578
582
  ```
579
583
 
584
+ ##### Azure Active Directory Authentication Connection String
585
+
586
+ Several types of Azure Authentication are supported:
587
+ ###### Authentication using Default Azure Credentials
588
+ ```
589
+ Server=*.database.windows.net;Database=database;Authentication=azure-active-directory-default;ClientID=clientid;Encrypt=true
590
+ ```
591
+ ###### Authentication using Active Directory Password
592
+ ```
593
+ Server=*.database.windows.net;Database=database;Authentication=azure-active-directory-password;User Id=username;Password=password;ClientID=clientid;TenantID=tenantid;Encrypt=true
594
+ ```
595
+ ###### Authentication using Access Token
596
+ ```
597
+ Server=*.database.windows.net;Database=database;Authentication=azure-active-directory-access-token;Token=token;Encrypt=true
598
+ ```
599
+ ###### Authentication using Service Principal
600
+ ```
601
+ Server=*.database.windows.net;Database=database;Authentication=azure-active-directory-service-principal-secret;ClientID=clientid;ClientSecret=clientsecret;TenantID=tenantid;Encrypt=true
602
+ ```
603
+
580
604
  ## Drivers
581
605
 
582
606
  ### Tedious
@@ -2097,4 +2121,4 @@ to create new connections or not
2097
2121
  [appveyor-url]: https://ci.appveyor.com/project/tediousjs/node-mssql
2098
2122
 
2099
2123
  [tedious-url]: https://www.npmjs.com/package/tedious
2100
- [msnodesqlv8-url]: https://www.npmjs.com/package/msnodesqlv8
2124
+ [msnodesqlv8-url]: https://www.npmjs.com/package/msnodesqlv8
package/bin/mssql CHANGED
File without changes
@@ -114,6 +114,9 @@ class ConnectionPool extends EventEmitter {
114
114
  case 'attachdbfilename':
115
115
  break
116
116
  case 'authentication':
117
+ Object.assign(config.authentication, {
118
+ type: value
119
+ })
117
120
  break
118
121
  case 'column encryption setting':
119
122
  break
@@ -133,6 +136,16 @@ class ConnectionPool extends EventEmitter {
133
136
  break
134
137
  case 'context connection':
135
138
  break
139
+ case 'client id':
140
+ Object.assign(config.authentication.options, {
141
+ clientId: value
142
+ })
143
+ break
144
+ case 'client secret':
145
+ Object.assign(config.authentication.options, {
146
+ clientSecret: value
147
+ })
148
+ break
136
149
  case 'current language':
137
150
  Object.assign(config.options, {
138
151
  language: value
@@ -222,6 +235,16 @@ class ConnectionPool extends EventEmitter {
222
235
  break
223
236
  case 'replication':
224
237
  break
238
+ case 'tenant id':
239
+ Object.assign(config.authentication.options, {
240
+ tenantId: value
241
+ })
242
+ break
243
+ case 'token':
244
+ Object.assign(config.authentication.options, {
245
+ token: value
246
+ })
247
+ break
225
248
  case 'transaction binding':
226
249
  Object.assign(config.options, {
227
250
  enableImplicitTransactions: value.toLowerCase() === 'implicit unbind'
@@ -278,7 +301,7 @@ class ConnectionPool extends EventEmitter {
278
301
  break
279
302
  }
280
303
  return config
281
- }, { options: {}, pool: {} })
304
+ }, { authentication: { options: {} }, options: {}, pool: {} })
282
305
  }
283
306
 
284
307
  /**
@@ -1,9 +1,9 @@
1
- 'use strict'
2
-
3
- module.exports = {
4
- READ_UNCOMMITTED: 0x01,
5
- READ_COMMITTED: 0x02,
6
- REPEATABLE_READ: 0x03,
7
- SERIALIZABLE: 0x04,
8
- SNAPSHOT: 0x05
9
- }
1
+ 'use strict'
2
+
3
+ module.exports = {
4
+ READ_UNCOMMITTED: 0x01,
5
+ READ_COMMITTED: 0x02,
6
+ REPEATABLE_READ: 0x03,
7
+ SERIALIZABLE: 0x04,
8
+ SNAPSHOT: 0x05
9
+ }
@@ -21,11 +21,11 @@ class ConnectionPool extends BaseConnectionPool {
21
21
  defaultConnectionString = CONNECTION_STRING_NAMED_INSTANCE
22
22
  }
23
23
 
24
- this.config.requestTimeout = this.config.requestTimeout || this.config.timeout || 15000
24
+ this.config.requestTimeout = this.config.requestTimeout ?? this.config.timeout ?? 15000
25
25
 
26
26
  const cfg = {
27
27
  conn_str: this.config.connectionString || defaultConnectionString,
28
- conn_timeout: (this.config.connectionTimeout || this.config.timeout || 15000) / 1000
28
+ conn_timeout: (this.config.connectionTimeout ?? this.config.timeout ?? 15000) / 1000
29
29
  }
30
30
 
31
31
  cfg.conn_str = cfg.conn_str.replace(/#{([^}]*)}/g, (p) => {
@@ -36,8 +36,8 @@ class ConnectionPool extends BaseConnectionPool {
36
36
 
37
37
  cfg.options.database = cfg.options.database || this.config.database
38
38
  cfg.options.port = cfg.options.port || this.config.port
39
- cfg.options.connectTimeout = cfg.options.connectTimeout || this.config.connectionTimeout || this.config.timeout || 15000
40
- cfg.options.requestTimeout = cfg.options.requestTimeout || this.config.requestTimeout || this.config.timeout || 15000
39
+ cfg.options.connectTimeout = cfg.options.connectTimeout ?? this.config.connectionTimeout ?? this.config.timeout ?? 15000
40
+ cfg.options.requestTimeout = cfg.options.requestTimeout ?? this.config.requestTimeout ?? this.config.timeout ?? 15000
41
41
  cfg.options.tdsVersion = cfg.options.tdsVersion || '7_4'
42
42
  cfg.options.rowCollectionOnDone = cfg.options.rowCollectionOnDone || false
43
43
  cfg.options.rowCollectionOnRequestCompletion = cfg.options.rowCollectionOnRequestCompletion || false
package/package.json CHANGED
@@ -21,7 +21,7 @@
21
21
  "azure",
22
22
  "node-mssql"
23
23
  ],
24
- "version": "9.0.0",
24
+ "version": "9.1.0",
25
25
  "main": "index.js",
26
26
  "repository": "github:tediousjs/node-mssql",
27
27
  "license": "MIT",
package/CHANGELOG.txt DELETED
@@ -1,667 +0,0 @@
1
- v9.0.0 (2022-08-10)
2
- -------------------
3
- [change] Upgrade tedious to v15 ([#1417](https://github.com/tediousjs/node-mssql/pull/1417))
4
- [removed] Removed NodeJS 10 & 12 support ([#1417](https://github.com/tediousjs/node-mssql/pull/1417))
5
-
6
- v8.1.3 (2022-08-08)
7
- -------------------
8
- [fix] requestTimeout correctly resolved ([#1398](https://github.com/tediousjs/node-mssql/pull/1398))
9
- [fix] Forcibly deny use of `useColumnNames` tedious config option that can be passed in the config object ([#1416](https://github.com/tediousjs/node-mssql/pull/1416))
10
-
11
- v8.1.2 (2022-05-27)
12
- -------------------
13
- [fix] quote identifiers in table constraint declaration ([#1397](https://github.com/tediousjs/node-mssql/pull/1397))
14
-
15
- v8.1.1 (2022-05-18)
16
- -------------------
17
- [fix] quote identifiers in table primary keys ([#1394](https://github.com/tediousjs/node-mssql/pull/1394))
18
-
19
- v8.1.0 (2022-04-06)
20
- -------------------
21
- [new] MSSQL CLI tool now accepts some options to allow overriding config file ((#1381](https://github.com/tediousjs/node-mssql/pull/1381))
22
- [fix] nodemsqlv8 driver tests working against Node 10 ([#1368](https://github.com/tediousjs/node-mssql/pull/1368))
23
-
24
- v8.0.2 (2022-02-07)
25
- -------------------
26
- Merge up missing fixes from v7.3.0
27
- [new] Transaction/PreparedStatements expose the config from their parent connection ([#1338](https://github.com/tediousjs/node-mssql/pull/1338))
28
- [fix] Fix inherited request configs from the pool. Specifically stream and arrayRowMode now inherit accurately from the connection config ([#1338](https://github.com/tediousjs/node-mssql/pull/1338))
29
-
30
- v8.0.1 (2022-01-30)
31
- -------------------
32
- Re-release of v8.0.0
33
-
34
- v8.0.0 (2022-01-30)
35
- -------------------
36
- [new] Add table.rows.clear() method to allow for chunking updates ([#1094](https://github.com/tediousjs/node-mssql/pull/1094))
37
- [new] Add valueHandler map to store callbacks that are used to process row values ([#1356](https://github.com/tediousjs/node-mssql/pull/1356))
38
- [change] msnodesqlv8 driver detects os platform and attempts to pick correct connections string for it ((#1318)[https://github.com/tediousjs/node-mssql/pull/1318])
39
- [change] Updated to latest Tedious 14 ((#1312)[https://github.com/tediousjs/node-mssql/pull/1312])
40
- [change] Errors for bad bulk load parameters have slightly different error messages ((#1318)[https://github.com/tediousjs/node-mssql/pull/1318])
41
- [change] Options provided to the driver via the config.options object will not be overridden with other values if set explicitly ((#1340)[https://github.com/tediousjs/node-mssql/pull/1340])
42
- [change] Duplicate column names will now be presented as an array even if the values are empty ((#1240)[https://github.com/tediousjs/node-mssql/pull/1240])
43
- [change] Update tarn pool dependency ((#1344)[https://github.com/tediousjs/node-mssql/pull/1344])
44
- [removed] Remove connection string parser helpers ((#1342)[https://github.com/tediousjs/node-mssql/pull/1342])
45
- [removed] Remove deprecated pool properties ((#1359)[https://github.com/tediousjs/node-mssql/pull/1359])
46
-
47
- v7.3.5 (2022-05-27)
48
- -------------------
49
- [fix] quote identifiers in table constraint declaration ([#1397](https://github.com/tediousjs/node-mssql/pull/1397))
50
-
51
- v7.3.4 (2022-05-18)
52
- -------------------
53
- [fix] msnodesqlv8.js file was missing from previous release
54
-
55
- v7.3.3 (2022-05-18)
56
- -------------------
57
- Duplicate tag
58
-
59
- v7.3.2 (2022-05-18)
60
- -------------------
61
- [fix] nodemsqlv8 driver tests working against Node 10 ([#1368](https://github.com/tediousjs/node-mssql/pull/1368))
62
- [fix] quote identifiers in table primary keys ([#1394](https://github.com/tediousjs/node-mssql/pull/1394))
63
-
64
- v7.3.1 (2022-02-24)
65
- -------------------
66
- [fix] Bump debug dependency ([#1361](https://github.com/tediousjs/node-mssql/pull/1361))
67
-
68
- v7.3.0 (2021-11-18)
69
- -------------------
70
- [new] Transaction/PreparedStatements expose the config from their parent connection ([#1338](https://github.com/tediousjs/node-mssql/pull/1338))
71
- [fix] Fix inherited request configs from the pool. Specifically stream and arrayRowMode now inherit accurately from the connection config ([#1338](https://github.com/tediousjs/node-mssql/pull/1338))
72
-
73
- v7.2.1 (2021-08-19)
74
- -------------------
75
- [fix] Fix issue with bulk insert of dates ((#1298)[https://github.com/tediousjs/node-mssql/pull/1298])
76
-
77
- v7.2.0 (2021-07-29)
78
- -------------------
79
- [new] Update Geography field parsing to provide lat/lng props from Geography Point ((#1282)[https://github.com/tediousjs/node-mssql/pull/1282])
80
- [fix] Handle errors when adding rows to bulk operations ((#1264)[https://github.com/tediousjs/node-mssql/pull/1264])
81
- [fix] Input/Output parameter passing fix for msnodesqlv8 driver ((#1275)[https://github.com/tediousjs/node-mssql/pull/1275])
82
-
83
- v7.1.3 (2021-06-11)
84
- -------------------
85
- [fix] Request timeout settings now respect value parsed from connection strings ((#1257)[https://github.com/tediousjs/node-mssql/pull/1257)
86
-
87
- v7.1.1 (2021-06-09)
88
- -------------------
89
- [fix] Errors from tedious connection creation now cause connection promise to reject ((#1254)[https://github.com/tediousjs/node-mssql/pull/1254])
90
- [fix] Encrypt and transaction binding settings now respect value parsed from connection strings ((#1252)[https://github.com/tediousjs/node-mssql/pull/1252)
91
-
92
- v7.1.0 (2021-05-13)
93
- -------------------
94
- [new] Add `parseJSON` support to query strings
95
- [fix] Bump various dependencies for security fixes
96
-
97
- v7.0.0 (2021-05-06)
98
- -------------------
99
- [new] Result sets with duplicate keys can now be handled using `request.arrayRowMode` ([#1130](https://github.com/tediousjs/node-mssql/pull/1130))
100
- [new] Requests in stream mode now emit a `rowsaffected` event ([#1213](https://github.com/tediousjs/node-mssql/pull/1213))
101
- [new] msnodesqlv8 driver now has detailed error support ([#1212](https://github.com/tediousjs/node-mssql/pull/1212))
102
- [new] Connection validation checks before releasing connections from the pool. This can be turned of via `validateConnection: false` config option ([#1192](https://github.com/tediousjs/node-mssql/pull/1192))
103
- [new] UseUTC is now supported on msnodesqlv8 connections ([#1222](https://github.com/tediousjs/node-mssql/pull/1222))
104
- [change] Updated to latest Tedious 11
105
- [change] Updated tarnjs to v3
106
- [change] Updated to support latest msnodesqlv8 v2 ([#1157](https://github.com/tediousjs/node-mssql/pull/1157))
107
- [change] Piped streams no longer have errors forwarded on to them ([#1028](https://github.com/tediousjs/node-mssql/pull/1028))
108
- [change] tedious config option `trustServerCertificate` defaults to `false` if not supplied ([#1030](https://github.com/tediousjs/node-mssql/pull/1030))
109
- [change] Request.pipe now pipes a true node stream for better support of backpressure ([#1078](https://github.com/tediousjs/node-mssql/pull/1078))
110
- [change] drop support for NodeJS < 10 ([#1070](https://github.com/tediousjs/node-mssql/pull/1070))
111
- [fix] Ensure line endings are unix style (LF)
112
- [fix] Avoid using deprecated `.inspect` on Objects ([#1071](https://github.com/tediousjs/node-mssql/pull/1071))
113
- [fix] Bump various dependencies for security fixes ([#1102](https://github.com/tediousjs/node-mssql/pull/1102))
114
- [fix] Trailing rows from request streams using msnodesqlv8 driver fail to be emitted ([#1109](https://github.com/tediousjs/node-mssql/pull/1109))
115
- [fix] Issue with geography v2 parsing resolve ([#1138](https://github.com/tediousjs/node-mssql/pull/1138))
116
- [fix] Connection config objects are now deep cloned when stored against a connection pool ([#1217](https://github.com/tediousjs/node-mssql/pull/1217))
117
- [removed] Support for connection uri format has been removed (eg: `mssql://user:password@host/?params=values`)
118
-
119
- v6.4.1 (2022-02-24)
120
- -------------------
121
- [fix] Bump debug dependency ([#1361](https://github.com/tediousjs/node-mssql/pull/1361))
122
-
123
- v6.4.0 (2021-11-18)
124
- -------------------
125
- [new] Transaction/PreparedStatements expose the config from their parent connection
126
- [fix] Fix inherited request configs from the pool. Specifically stream and arrayRowMode now inherit accurately from the connection config ([#1338](https://github.com/tediousjs/node-mssql/pull/1338))
127
-
128
- v6.3.2 (2021-05-13)
129
- -------------------
130
- [fix] Bump various dependencies for security fixes
131
-
132
- v6.3.1 (2021-01-01)
133
- -------------------
134
- [fix] Ensure line endings are unix style (LF)
135
-
136
- v6.3.0 (2020-12-14)
137
- -------------------
138
- [new] Result sets with duplicate keys can now be handled using `request.arrayRowMode` ([#1130](https://github.com/tediousjs/node-mssql/pull/1130))
139
- [fix] Issue with geography v2 parsing resolve ([#1138](https://github.com/tediousjs/node-mssql/pull/1138))
140
- [fix] Fixed issue where msnodesqlv8 could sometimes terminate queries before all errors has been emitted causing queries to hang ([#1145](https://github.com/tediousjs/node-mssql/pull/1145))
141
-
142
- v6.2.3 (2020-09-25)
143
- -------------------
144
- [fix] Remove reference to global pool on connection error ([#1107](https://github.com/tediousjs/node-mssql/pull/1107))
145
- [fix] Trailing rows from request streams using msnodesqlv8 driver fail to be emitted ([#1109](https://github.com/tediousjs/node-mssql/pull/1109))
146
-
147
- v6.2.2 (2020-09-18)
148
- -------------------
149
- [fix] Avoid using deprecated `.inspect` on Objects ([#1071](https://github.com/tediousjs/node-mssql/pull/1071))
150
- [fix] Bump various dependencies for security fixes ([#1102](https://github.com/tediousjs/node-mssql/pull/1102))
151
-
152
- v6.2.1 (2020-07-22)
153
- -------------------
154
- [fix] Bump various dependencies for security fixes
155
-
156
- v6.2.0 (2020-03-13)
157
- -------------------
158
- [new] Set default isolationLevel for all transactions ([#1005](https://github.com/tediousjs/node-mssql/pull/1005))
159
- [new] sql.Date now is coerced into a date object ([#1007](https://github.com/tediousjs/node-mssql/pull/1007))
160
- [fix] Bump acorn dependency for security fix
161
-
162
- v6.1.0 (2020-02-17)
163
- -------------------
164
- [new] Add `Request.template` helper for providing templated strings to queries ([#960](https://github.com/tediousjs/node-mssql/pull/960))
165
- [new] Repeat calls to `ConnectionPool.connect()` resolve ([#941](https://github.com/tediousjs/node-mssql/pull/941))
166
- [new] Stored procedure params are now logged to debug log ([#979](https://github.com/tediousjs/node-mssql/pull/979))
167
- [fix] Repeat calls to `mssql.connect()` will now resolve correctly ([#986](https://github.com/tediousjs/node-mssql/pull/986))
168
- [fix] Connections are encrypted by default as documented ([#977](https://github.com/tediousjs/node-mssql/pull/977))
169
- [fix] Tagged template literal queries with empty array values now work ([#990](https://github.com/tediousjs/node-mssql/pull/990))
170
-
171
- v6.0.1 (2019-11-15)
172
- -------------------
173
- [fix] Fix an issue with connection strings where usernames have url encoded values ([#945](https://github.com/tediousjs/node-mssql/pull/945)
174
-
175
- v6.0.0 (2019-11-05)
176
- -------------------
177
- [fix] Fixed bug when trying to bulk insert columns that were `NVarChar(MAX)` ([#901](https://github.com/tediousjs/node-mssql/pull/901))
178
- [fix] Fixed an issue where Object prototype pollution could cause errors ([#879](https://github.com/tediousjs/node-mssql/pull/879))
179
- [fix] Fixed an issue where Request.input didn't validate against 0 parameters being passed ([#885](https://github.com/tediousjs/node-mssql/pull/885))
180
- [new] Implement pause/resume for msnodesqlv8 driver ([#877](https://github.com/tediousjs/node-mssql/pull/877))
181
- [new] Added `healthy` flag to the pool to help determine if the pool is safe to use or not ([#816](https://github.com/tediousjs/node-mssql/pull/816))
182
- [new] Invalid isolation levels passed to transactions will now throw an error
183
- [new] Duplicate parameter names in queries/stored procedures will now throw an error
184
- [new] `replaceInput` and `replaceOutput` functions added to `Request` and `PreparedStatement` to facilitate replacing existing parameters
185
- [new] Calls to the global `connect` function will return the global connection if it exists
186
- [new] Bulk table inserts now attempt to coerce Date objects out of non Date values
187
- [change] Closing the global connection by reference will now cleanup the internally managed globalConnection
188
- [change] Upgraded tedious to v6 ([#818](https://github.com/tediousjs/node-mssql/pull/818) and [#933](https://github.com/tediousjs/node-mssql/pull/933))
189
- [change] Upgraded msnodesqlv8 support to v0.7 ([#877](https://github.com/tediousjs/node-mssql/pull/877))
190
- [change] Remove references to deprecated `TYPES.Null` from tedious
191
- [change] `options.encrypt` is now set to true by default
192
- [change] Upgraded `debug` dependency to v4
193
- [change] Config objects are cloned so that the original object is not modified
194
- [change] Replaced pool library (`generic-pool`) with `tarn.js` ([#808](https://github.com/tediousjs/node-mssql/pull/808))
195
- [removed] Backoff try strategy for creating connections removed, `tarn.js` built-in retry strategy used instead
196
-
197
- v5.1.5 (2021-05-13)
198
- -------------------
199
- [fix] Bump various dependencies for security fixes
200
-
201
- v5.1.4 (2021-01-01)
202
- -------------------
203
- [fix] Ensure line endings are unix style (LF)
204
-
205
- v5.1.3 (2020-09-18)
206
- -------------------
207
- [fix] Avoid using deprecated `.inspect` on Objects ([#1071](https://github.com/tediousjs/node-mssql/pull/1071))
208
- [fix] Bump various dependencies for security fixes ([#1102](https://github.com/tediousjs/node-mssql/pull/1102))
209
-
210
- v5.1.2 (2020-07-22)
211
- -------------------
212
- [fix] Bump various dependencies for security fixes
213
-
214
- v5.1.1 (2020-03-13)
215
- -------------------
216
- [fix] Bump acorn dependency for security fix
217
-
218
- v5.1.0 (2019-04-17)
219
- -------------------
220
- [new] Add readOnlyIntent to connection string parser ([#853](https://github.com/tediousjs/node-mssql/pull/853))
221
-
222
- v5.0.6 (2019-04-17)
223
- -------------------
224
- [fix] Ensure callbacks don't block the event loop by executing them with `setImmediate` ([#855](https://github.com/tediousjs/node-mssql/pull/855))
225
-
226
- v5.0.5 (2019-03-28)
227
- -------------------
228
- [fix] Fix an issue where connections that error can deplete the pool ([#842](https://github.com/tediousjs/node-mssql/pull/842))
229
-
230
- v5.0.4 (2019-03-27)
231
- -------------------
232
- [fix] Fix a bug where msnodesqlv8 driver could execute callbacks twice ([#834](https://github.com/tediousjs/node-mssql/pull/834))
233
- [fix] npm audit fix on vulnerable dependencies
234
-
235
- v5.0.3 (2019-03-13)
236
- -------------------
237
- [fix] Fix a bug with streamed requests that start paused ([#833](https://github.com/tediousjs/node-mssql/pull/833))
238
-
239
- v5.0.2 (2019-03-09)
240
- -------------------
241
- [change] Remove references to deprecated `TYPES.Null` from tedious
242
-
243
- v5.0.1 (2019-03-09)
244
- -------------------
245
- [change] Config objects are cloned so that the original object is not modified
246
-
247
- v5.0.0 (2019-03-07)
248
- -------------------
249
- [new] Added pause / resume feature to streamed requests ([#775](https://github.com/tediousjs/node-mssql/pull/775))
250
- [new] Added options argument to bulk requests for compatibility with tedious driver
251
- [new] Added a backoff retry strategy for failed connection creation to mitigate issue with `generic-pool` connection creation logic ([#806](https://github.com/tediousjs/node-mssql/pull/806)
252
- [change] Updated to latest Tedious 4.1.1
253
- [removed] Node.js < 6 is no longer supported
254
- [removed] Support dropped for deprecated tedious configuration values and types
255
-
256
- v4.3.9 (2020-07-22)
257
- -------------------
258
- [fix] Bump various dependencies for security fixes
259
-
260
- v4.3.8 (2020-03-13)
261
- -------------------
262
- [fix] Bump acorn dependency for security fix
263
-
264
- v4.3.7 (2019-03-29)
265
- -------------------
266
- [fix] Fix an issue where connections that error can deplete the pool ([#842](https://github.com/tediousjs/node-mssql/pull/842))
267
-
268
- v4.3.6 (2019-03-27)
269
- -------------------
270
- [fix] Fix a bug where msnodesqlv8 driver could execute callbacks twice ([#834](https://github.com/tediousjs/node-mssql/pull/834))
271
- [fix] Bump js-yaml dependency for security fix
272
-
273
- v4.3.5 (2019-03-09)
274
- -------------------
275
- [change] Remove references to deprecated `TYPES.Null` from tedious
276
-
277
- v4.3.4 (2019-03-09)
278
- -------------------
279
- [change] Config objects are cloned so that the original object is not modified
280
-
281
- v4.3.3 (2019-03-07)
282
- -------------------
283
- [change] Updated to latest generic-pool 3.6.1
284
-
285
- v4.3.0 (2018-11-20)
286
- -------------------
287
- [new] Add beforeConnect handler
288
- [change] Interpret connection timeout in seconds (not milliseconds)
289
-
290
- v4.2.3 (2018-11-03)
291
- -------------------
292
- [new] Add info event for execute function
293
- [fix] Fix JSON parsing with empty recordsets
294
- [new] Array / string literal template query preparation fixes
295
- [new] Passing encrypt option from mssql connection options to tedious options
296
- [change] Return the _poolDestroy promise before connecting again
297
-
298
- v4.2.2 (2018-10-17)
299
- -------------------
300
- [change] Updated to latest Tedious 2.7.1
301
-
302
- v4.2.1 (2018-08-05)
303
- -------------------
304
- [fix] Fix connections in the pool depleting due to unfulfilled Promises and timeouts
305
- [change] Updated to latest Tedious 2.6.4
306
-
307
- v4.2.0 (2018-07-05)
308
- -------------------
309
- [new] Added TVP support for msnodesqlv8 driver
310
- [new] Added support for information messages in msnodesqlv8 driver
311
- [new] Added support for request cancellation in msnodesqlv8 driver
312
- [fix] Fixed Tedious deprecation warnings
313
- [fix] Fixed ResourceRequest timed out error
314
- [fix] All query and batch methods now have the same interface
315
- [fix] Fixed msnodesqlv8 issue where the encrypt option was getting ignored
316
- [change] Updated to latest Tedious 2.3.1
317
-
318
- v4.1.0 (2017-09-29)
319
- -------------------
320
- [new] Adding support for the MultiSubnetFailover option in connection strings (Paul Kehrer)
321
- [new] Add request timeout support for msnodesqlv8 queries (Michael Parque)
322
- [fix] Fix type inference of non-integer numbers (Andrew Crites)
323
- [fix] Set acquireTimeout on generic pool (Karl Wiggisser)
324
-
325
- v4.0.4 (2017-04-25)
326
- -------------------
327
- [fix] Fix auto-closing of idle connections
328
-
329
- v4.0.3 (2017-04-25)
330
- -------------------
331
- [fix] Fixed broken CLI & debugging
332
-
333
- v4.0.2 (2017-04-19)
334
- -------------------
335
- [fix] Fixed broken JSON parser
336
-
337
- v4.0.1 (2017-04-02)
338
- -------------------
339
- [fix] Fixed stream in pipe mode
340
-
341
- v4.0.0 (2017-04-01)
342
- -------------------
343
- [new] Completly rewritten to ES6
344
- [new] Library is now compatible with Webpack
345
- [new] Library is ready for async/await
346
- [change] Removed support for < Node.js 4
347
- [change] Removed support for outdated node-tds and msnodesql drivers
348
- [change] Removed require('mssql/nofix') syntax
349
- [change] Removed verbose and debug mode
350
- [change] Removed 'driver' from options
351
- [change] Removed Transaction and Prepared Statement queues
352
- [change] Removed 'multiple' directive
353
- [change] Connection renamed to ConnectionPool
354
- [change] Updated to latest Tedious 2.0.0
355
-
356
- v3.3.0 (2016-05-06)
357
- -------------------
358
- [new] Added support for receiving informational messages
359
- [new] Added JSON support for msnodesql and msnodesqlv8 drivers
360
- [fix] Minor fixes in connection string parsing
361
-
362
- v3.2.1 (2016-04-16)
363
- -------------------
364
- [fix] Added PreparedStatement.lastRequest to access internal Request when using Promises
365
-
366
- v3.2.0 (2016-04-11)
367
- -------------------
368
- [new] Added experimental support for ES6 tagged template literals
369
- [new] Added support for Variant data type
370
- [change] Updated to latest Tedious 1.14.0
371
-
372
- v3.1.2 (2016-03-08)
373
- -------------------
374
- [fix] Correctly release connection after transaction error
375
-
376
- v3.1.1 (2016-02-21)
377
- -------------------
378
- [change] Minor internal changes because of connect-mssql module
379
-
380
- v3.1.0 (2016-02-13)
381
- -------------------
382
- [new] Added support for creating columns with primary keys in TVP Tables
383
-
384
- v3.0.1 (2016-02-04)
385
- -------------------
386
- [fix] Fix error causing app to crash when parsing json/xml from stored procedure
387
- [fix] Correctly check connection health after socket error
388
-
389
- v3.0.0 (2016-01-08)
390
- -------------------
391
- [new] Version bump because of breakinch change introduced in release 2.6
392
-
393
- v2.6.2 (2015-12-25) - unpublished from npm
394
- -------------------
395
- [new] Added support for receiving number of affected rows
396
- [new] Automatically concat chunks of FOR XML / FOR JSON recordset
397
- [fix] Correctly preserve domains
398
-
399
- v2.5.0 (2015-12-17)
400
- -------------------
401
- [new] Added support for new TDS driver msnodesqlv8
402
- [new] Support for configs formated as Connection String, Connection String URI
403
-
404
- v2.4.0 (2015-12-11)
405
- -------------------
406
- [new] Connection.connect, PreparedStatement.prepare and Transaction.begin now returns instance of itself as a first argument to Promise resolver.
407
- [fix] Correctly handle Socket Errors inside Requests (Jørgen Elgaard Larsen)
408
-
409
- v2.3.2 (2015-11-11)
410
- -------------------
411
- [change] Updated to latest Tedious 1.13.1
412
-
413
- v2.3.1 (2015-09-21)
414
- -------------------
415
- [fix] JSON fixes
416
-
417
- v2.3.0 (2015-09-20)
418
- -------------------
419
- [new] Experimental JSON support
420
-
421
- v2.2.1 (2015-09-19)
422
- -------------------
423
- [change] Updated to latest Tedious 1.12.3
424
- [fix] Promise not returns rowCount in bulk load (Ben Farr)
425
-
426
- v2.2.0 (2015-08-17)
427
- -------------------
428
- [new] Added column metadata identity, caseSensitive and readOnly (nino-porcino)
429
-
430
- v2.1.8 (2015-08-11)
431
- -------------------
432
- [change] Updated to latest Tedious 1.12.2
433
-
434
- v2.1.7 (2015-08-09)
435
- -------------------
436
- [change] Updated to latest Tedious 1.11.4
437
-
438
- v2.1.6 (2015-06-17)
439
- -------------------
440
- [change] Updated to latest Tedious 1.11.2
441
-
442
- v2.1.5 (2015-06-05)
443
- -------------------
444
- [fix] Correctly resolve database and schema name from table path.
445
-
446
- v2.1.4 (2015-06-05)
447
- -------------------
448
- [new] Better test coverage, automated integration tests.
449
- [fix] msnodesql: Manual transaction aborting.
450
- [fix] msnodesql: Tests.
451
-
452
- v2.1.3 (2015-05-03)
453
- -------------------
454
- [fix] msnodesql: Release connection to pool on query error (Farhan Khan)
455
-
456
- v2.1.2 (2015-03-28)
457
- -------------------
458
- [fix] Fix name parsing in Table constructor (David Mercer)
459
-
460
- v2.1.1 (2015-02-25)
461
- -------------------
462
- [fix] Fix Promise in Prepared Statement
463
-
464
- v2.1.0 (2015-02-20)
465
- -------------------
466
- [new] Detailed SQL errors
467
- [fix] Precise detection of column data types
468
-
469
- v2.0.0 (2015-02-17)
470
- -------------------
471
- [change] Updated to latest Tedious 1.10.0
472
- [new] Promises
473
- [new] Pipe request to object stream
474
- [new] Integrated type checks
475
- [new] CLI
476
- [fix] Transaction Abort Handling
477
- [fix] Allow rollback on transaction with queued requests
478
- [fix] Connection pool fixes
479
- [fix] Minor fixes
480
-
481
- v1.3.0 (2014-10-27)
482
- -------------------
483
- [change] Updated to latest Tedious 1.7.0
484
- [new] Tedious: Char and NChar types are now available as input parameters
485
-
486
- v1.2.1 (2014-10-07)
487
- -------------------
488
- [change] Updated to latest Tedious 1.5.3
489
-
490
- v1.2.0 (2014-08-26)
491
- -------------------
492
- [change] Updated to latest Tedious 1.4.0
493
- [new] Added support for bulk insert.
494
-
495
- v1.1.1 (2014-08-07)
496
- -------------------
497
- [new] Added column index to recordset metadata.
498
- [fix] Minor fixes in Tedious driver
499
-
500
- v1.1.0 (2014-07-13)
501
- -------------------
502
- [change] Updated to latest Tedious 1.1.0
503
- [new] Added support for domain logins (NTLM)
504
-
505
- v1.0.2 (2014-07-04)
506
- -------------------
507
- [new] Added support for input and output parameters in batch method.
508
- [new] Added checks for SQL injection in parameter names
509
-
510
- v1.0.1 (2014-07-04)
511
- -------------------
512
- [new] Added support for Streaming in Prepared Statements
513
-
514
- v1.0.0 (2014-07-04)
515
- -------------------
516
- [new] Start of semantic versioning, and commitment to stable API until 2.0.0
517
-
518
- v0.6.2 (2014-07-04)
519
- -------------------
520
- [new] Added batch() method to execute sql commands like "create procedure"
521
- [new] Cancel request in node-tds driver
522
- [fix] Fixed VarChar/NVarChar/VarBinary MAX in prepared statements
523
-
524
- v0.6.1 (2014-07-04)
525
- -------------------
526
- [change] TDS debugging simplified
527
-
528
- v0.6.0 (2014-07-03)
529
- -------------------
530
- [change] Updated to latest Tedious 1.0.0
531
- [new] Added support for Streaming
532
- [new] Added option to set request timeout (config.requestTimeout = 15000)
533
- [new] Errors documented
534
- [change] Connection timeout renamed from config.timeout to config.connectionTimeout
535
- [fix] Minor bug fixes
536
-
537
- v0.5.5 (2014-06-24)
538
- -------------------
539
- [fix] Failed login left open connection pool
540
-
541
- v0.5.4 (2014-06-15)
542
- -------------------
543
- [new] Multiple errors handling
544
-
545
- v0.5.3 (2014-04-04)
546
- -------------------
547
- [fix] Multiple recordsets in Prepared Statements
548
-
549
- v0.5.2 (2014-04-04)
550
- -------------------
551
- [new] Support for Prepared Statements
552
- [fix] Fixed order of output parameters
553
- [fix] Minor fixes in node-tds driver
554
-
555
- v0.5.1 (2014-04-01)
556
- -------------------
557
- [change] Updated to new Tedious 0.2.1
558
- [new] You can now easily setup type's length/scale (sql.VarChar(50))
559
- [new] Serialization of Geography and Geometry CLR types
560
- [new] Support for creating Table-Value Parameters (var tvp = new sql.Table())
561
- [new] Output parameters are now Input-Output and can handle initial value
562
- [new] Option to choose whether to pass/receive times in UTC or local time
563
- [new] Connecting to named instances simplified
564
- [change] Default SQL data type for JS String type is now NVarChar (was VarChar)
565
-
566
- v0.5.0 (2014-01-25)
567
- -------------------
568
- [new] You can now attach event listeners to Connection (connect, close), Transaction (begin, commit, rollback) and Request (row, recordset, done)
569
- [new] You can now set length of Char, NChar and Binary output parameters
570
- [new] You can now change default transaction isolation level
571
- [change] Errors are now splitted to three categories for better error handling - ConnectionError, TransactionError, ReqestError
572
- [new] Tedious: Binary and VarBinary types are now available as input and output parameters
573
- [new] Tedious: Image type is now available as input parameter
574
- [change] Tedious: Binary, VarBinary and Image types are now returned as buffer (was byte array)
575
- [change] Tedious: Transaction isolationLevel default is now READ_COMMITED (was READ_UNCOMMITED)
576
- [fix] Tedious: Fixed issue when zero value was casted as null when using BigInt as input parameter
577
- [fix] Tedious: Fixed issue when dates before 1900/01/01 in input parameters resulted in "Out of bounds" error
578
- [new] node-tds: UniqueIdentifier type in now available as input and output parameter
579
- [fix] node-tds: UniqueIdentifier type is now parsed correctly as string value (was buffer)
580
- [fix] node-tds: Text, NText, Char, NChar, VarChar and NVarChar input parameters has correct lengths
581
- [fix] node-tds: Fixed Error messages
582
- [fix] Msnodesql: Char, NChar, Xml, Text, NText and VarBinary types are now correctly functional as output parameters
583
-
584
- v0.4.5 (2014-01-23)
585
- -------------------
586
- [new] Added support for "co" flow controller via co-mssql module
587
-
588
- v0.4.4 (2014-01-22)
589
- -------------------
590
- [change] returnValue also accessible as property of recordsets
591
-
592
- v0.4.3 (2014-01-14)
593
- -------------------
594
- [fix] Even better network error handling in tedious
595
- [new] Module is compatible with Node.js 0.11
596
-
597
- v0.4.2 (2014-01-06)
598
- -------------------
599
- [new] Added connection timeout for node-tds
600
- [fix] Module now handle tedious network errors correctly
601
- [fix] Connection pool now destroy failed connections correctly
602
- [fix] Connection to instance name via tedious now works correctly
603
- [change] Option 'timeout' is now common option for all drivers (see documentation)
604
-
605
- v0.4.1 (2013-12-13)
606
- -------------------
607
- [fix] Filter empty recordsets when NOCOUNT is OFF
608
-
609
- v0.4.0 (2013-12-12)
610
- -------------------
611
- [new] Added support for transactions.
612
- [new] node-tds is now available as an optional TDS driver.
613
- [new] Documentation updated to CSDoc spec.
614
- [change] Tedious driver no longer use tedious-connection-pool for connection pooling
615
- [change] Msnodesql is now pooled
616
-
617
- v0.3.4 (2013-10-23)
618
- -------------------
619
- [new] Queries with input and output parameters.
620
-
621
- v0.3.3 (2013-10-23)
622
- -------------------
623
- [new] Test connection when tedious pool is created.
624
-
625
- v0.3.2 (2013-09-30)
626
- -------------------
627
- [new] Added support for multiple connections.
628
-
629
- v0.3.1 (2013-09-13)
630
- -------------------
631
- [fix] NaN values of input parameters are automatically converted to null.
632
-
633
- v0.3.0 (2013-09-08)
634
- -------------------
635
- [new] Documentation extended
636
- [new] Microsoft Driver for Node.js for SQL Server is now available as an optional TDS driver.
637
- [new] Metadata are now accesible trough recordset.columns property.
638
- [new] Support for multiple recordsets in query.
639
- [fix] SQL null values are now correctly casted as JS null.
640
- [change] Default SQL data type for JS Number is now sql.Int (was sql.BigInt).
641
-
642
- v0.2.5 (2013-09-05)
643
- -------------------
644
- [fix] Multiple columns with identical name in same recordset are now handled correctly.
645
-
646
- v0.2.4 (2013-08-15)
647
- -------------------
648
- [fix] Errors are now instance of Error.
649
- [fix] Empty recordsets fixed.
650
-
651
- v0.2.3 (2013-08-14)
652
- -------------------
653
- [new] Verbose mode for query.
654
-
655
- v0.2.2 (2013-08-11)
656
- -------------------
657
- [new] Verbose mode for stored procedure.
658
- [fix] Null values fixed.
659
-
660
- v0.2.0 (2013-08-10)
661
- -------------------
662
- [change] Project was renamed from xsp-mssql to node-mssql.
663
- [fix] Some minor bug fixes.
664
-
665
- v0.1.0 (2013-07-10)
666
- -------------------
667
- Initial release.