mssql 8.1.2 → 8.1.3
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/CHANGELOG.txt +5 -0
- package/LICENSE.md +22 -22
- package/bin/mssql +0 -0
- package/lib/base/connection-pool.js +9 -0
- package/lib/base/request.js +1 -1
- package/lib/isolationlevel.js +9 -9
- package/lib/msnodesqlv8/connection-pool.js +2 -4
- package/lib/msnodesqlv8/request.js +1 -1
- package/lib/tedious/connection-pool.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.txt
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
v8.1.3 (2022-08-08)
|
|
2
|
+
-------------------
|
|
3
|
+
[fix] requestTimeout correctly resolved ([#1398](https://github.com/tediousjs/node-mssql/pull/1398))
|
|
4
|
+
[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))
|
|
5
|
+
|
|
1
6
|
v8.1.2 (2022-05-27)
|
|
2
7
|
-------------------
|
|
3
8
|
[fix] quote identifiers in table constraint declaration ([#1397](https://github.com/tediousjs/node-mssql/pull/1397))
|
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/bin/mssql
CHANGED
|
File without changes
|
|
@@ -8,6 +8,7 @@ const { IDS } = require('../utils')
|
|
|
8
8
|
const ConnectionError = require('../error/connection-error')
|
|
9
9
|
const shared = require('../shared')
|
|
10
10
|
const clone = require('rfdc/default')
|
|
11
|
+
const { MSSQLError } = require('../error')
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Class ConnectionPool.
|
|
@@ -68,6 +69,14 @@ class ConnectionPool extends EventEmitter {
|
|
|
68
69
|
this.config.options.instanceName = RegExp.$2
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
if (typeof this.config.options.useColumnNames !== 'undefined' && this.config.options.useColumnNames !== true) {
|
|
73
|
+
const ex = new MSSQLError('Invalid options `useColumnNames`, use `arrayRowMode` instead')
|
|
74
|
+
if (typeof callback === 'function') {
|
|
75
|
+
return setImmediate(callback, ex)
|
|
76
|
+
}
|
|
77
|
+
throw ex
|
|
78
|
+
}
|
|
79
|
+
|
|
71
80
|
if (typeof callback === 'function') {
|
|
72
81
|
this.connect(callback)
|
|
73
82
|
}
|
package/lib/base/request.js
CHANGED
|
@@ -48,7 +48,7 @@ class Request extends EventEmitter {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* Generate sql string and set
|
|
51
|
+
* Generate sql string and set input parameters from tagged template string.
|
|
52
52
|
*
|
|
53
53
|
* @param {Template literal} template
|
|
54
54
|
* @return {String}
|
package/lib/isolationlevel.js
CHANGED
|
@@ -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,13 +21,11 @@ class ConnectionPool extends BaseConnectionPool {
|
|
|
21
21
|
defaultConnectionString = CONNECTION_STRING_NAMED_INSTANCE
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
this.config.requestTimeout = 15000
|
|
26
|
-
}
|
|
24
|
+
this.config.requestTimeout = this.config.requestTimeout || this.config.timeout || 15000
|
|
27
25
|
|
|
28
26
|
const cfg = {
|
|
29
27
|
conn_str: this.config.connectionString || defaultConnectionString,
|
|
30
|
-
conn_timeout: (this.config.connectionTimeout || 15000) / 1000
|
|
28
|
+
conn_timeout: (this.config.connectionTimeout || this.config.timeout || 15000) / 1000
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
cfg.conn_str = cfg.conn_str.replace(/#{([^}]*)}/g, (p) => {
|
|
@@ -369,7 +369,7 @@ class Request extends BaseRequest {
|
|
|
369
369
|
}
|
|
370
370
|
const param = this.parameters[name]
|
|
371
371
|
if (param.io === 1 || (param.io === 2 && param.value)) {
|
|
372
|
-
params.push(castParameter(param.value, param.type
|
|
372
|
+
params.push(castParameter(param.value, param.type))
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
|
|
@@ -37,7 +37,7 @@ class ConnectionPool extends BaseConnectionPool {
|
|
|
37
37
|
cfg.options.database = cfg.options.database || this.config.database
|
|
38
38
|
cfg.options.port = cfg.options.port || this.config.port
|
|
39
39
|
cfg.options.connectTimeout = cfg.options.connectTimeout || this.config.connectionTimeout || this.config.timeout || 15000
|
|
40
|
-
cfg.options.requestTimeout = cfg.options.requestTimeout || this.config.requestTimeout
|
|
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
|