stimulsoft-data-adapter 2022.2.6 → 2022.3.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.
@@ -1,14 +1,14 @@
1
1
  /*
2
2
  Stimulsoft.Reports.JS
3
- Version: 2022.2.6
4
- Build date: 2022.05.27
3
+ Version: 2022.3.3
4
+ Build date: 2022.07.15
5
5
  License: https://www.stimulsoft.com/en/licensing/reports
6
6
  */
7
7
  exports.process = function (command, onResult) {
8
8
  var end = function (result) {
9
9
  try {
10
10
  if (db) db.detach();
11
- result.adapterVersion = "2022.2.6";
11
+ result.adapterVersion = "2022.3.3";
12
12
  onResult(result);
13
13
  }
14
14
  catch (e) {
package/MSSQLAdapter.js CHANGED
@@ -1,14 +1,14 @@
1
1
  /*
2
2
  Stimulsoft.Reports.JS
3
- Version: 2022.2.6
4
- Build date: 2022.05.27
3
+ Version: 2022.3.3
4
+ Build date: 2022.07.15
5
5
  License: https://www.stimulsoft.com/en/licensing/reports
6
6
  */
7
7
  exports.process = function (command, onResult) {
8
8
  var end = function (result) {
9
9
  try {
10
10
  if (connection) connection.close();
11
- result.adapterVersion = "2022.2.6";
11
+ result.adapterVersion = "2022.3.3";
12
12
  onResult(result);
13
13
  }
14
14
  catch (e) {
@@ -52,7 +52,7 @@ exports.process = function (command, onResult) {
52
52
  var column = recordset.columns[columnName];
53
53
  var columnIndex = columns.length;
54
54
  columns.push(column.name);
55
-
55
+
56
56
  switch (column.type) {
57
57
  case sql.UniqueIdentifier:
58
58
  case sql.BigInt:
@@ -121,7 +121,7 @@ exports.process = function (command, onResult) {
121
121
 
122
122
  if (columnName == "" && Array.isArray(recordset[recordIndex][columnName])) {
123
123
  for (var i = 0; i < recordset[recordIndex][columnName].length; i++) {
124
- if (columns.length <= columnIndex + i && columns[columnIndex + i] != ""){
124
+ if (columns.length <= columnIndex + i && columns[columnIndex + i] != "") {
125
125
  columns.splice(columnIndex + i - 1, 0, columns[columnIndex]);
126
126
  types.splice(columnIndex + i - 1, 0, types[columnIndex]);
127
127
  }
package/MySQLAdapter.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  Stimulsoft.Reports.JS
3
- Version: 2022.2.6
4
- Build date: 2022.05.27
3
+ Version: 2022.3.3
4
+ Build date: 2022.07.15
5
5
  License: https://www.stimulsoft.com/en/licensing/reports
6
6
  */
7
7
  exports.process = function (command, onResult) {
@@ -10,7 +10,7 @@ exports.process = function (command, onResult) {
10
10
  if (connection) {
11
11
  connection.end();
12
12
  }
13
- result.adapterVersion = "2022.2.6";
13
+ result.adapterVersion = "2022.3.3";
14
14
  onResult(result);
15
15
  }
16
16
  catch (e) {
@@ -122,9 +122,14 @@ exports.process = function (command, onResult) {
122
122
  }
123
123
 
124
124
  if (recordset[recordIndex][columnName] != null && typeof recordset[recordIndex][columnName].toISOString === "function") {
125
- var dateTime = new Date(recordset[recordIndex][columnName].getTime() - (recordset[recordIndex][columnName].getTimezoneOffset() * 60000)).toISOString();
126
- recordset[recordIndex][columnName] = dateTime.replace("Z", "");
125
+ var time = recordset[recordIndex][columnName].getTime();
127
126
  types[columnIndex] = "datetime";
127
+ if (isNaN(time)) {
128
+ recordset[recordIndex][columnName] = null;
129
+ } else {
130
+ var dateTime = new Date(time - (recordset[recordIndex][columnName].getTimezoneOffset() * 60000)).toISOString();
131
+ recordset[recordIndex][columnName] = dateTime.replace("Z", "");
132
+ }
128
133
  }
129
134
 
130
135
  row[columnIndex] = recordset[recordIndex][columnName];
@@ -186,7 +191,7 @@ exports.process = function (command, onResult) {
186
191
  return info;
187
192
  };
188
193
 
189
- var mysql = require('mysql');
194
+ var mysql = require('mysql2');
190
195
  command.connectionStringInfo = getConnectionStringInfo(command.connectionString);
191
196
 
192
197
  var connection = mysql.createConnection({
@@ -1,14 +1,14 @@
1
1
  /*
2
2
  Stimulsoft.Reports.JS
3
- Version: 2022.2.6
4
- Build date: 2022.05.27
3
+ Version: 2022.3.3
4
+ Build date: 2022.07.15
5
5
  License: https://www.stimulsoft.com/en/licensing/reports
6
6
  */
7
7
  exports.process = function (command, onResult) {
8
8
  var end = function (result) {
9
9
  try {
10
10
  if (client) client.end();
11
- result.adapterVersion = "2022.2.6";
11
+ result.adapterVersion = "2022.3.3";
12
12
  onResult(result);
13
13
  }
14
14
  catch (e) {
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  Stimulsoft.Reports.JS
3
- Version: 2022.2.6
4
- Build date: 2022.05.27
3
+ Version: 2022.3.3
4
+ Build date: 2022.07.15
5
5
  License: https://www.stimulsoft.com/en/licensing/reports
6
6
  */
7
7
 
@@ -100,13 +100,13 @@ function getResponse(result) {
100
100
  return result
101
101
  }
102
102
  function onProcess(onResult, encryptData, result) {
103
- result.handlerVersion = "2022.2.6";
103
+ result.handlerVersion = "2022.3.3";
104
104
  result.checkVersion = true;
105
105
  result.encryptData = encryptData;
106
106
  onResult(result);
107
107
  }
108
108
 
109
- module.exports = { getCommand, process };
109
+ module.exports = { getCommand, process, getResponse };
110
110
 
111
111
  if (require.main === module) {
112
112
  var http = require('http');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stimulsoft-data-adapter",
3
- "version": "2022.2.6",
3
+ "version": "2022.3.3",
4
4
  "description": "Nodejs data adapter for Stimulsoft Reports.JS",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "mssql": "^6.2.1",
15
- "mysql": "^2.15.0",
15
+ "mysql2": "^2.3.3",
16
16
  "node-firebird": "^0.9.8",
17
17
  "pg": "^8.3.3",
18
18
  "tzdata": "^1.0.25"