orange-orm 5.3.3 → 5.3.4

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.
@@ -7288,6 +7288,14 @@ function requireNewUpdateCommandCore () {
7288
7288
  else if (engine === 'sqlite') {
7289
7289
  command = command.append(separator + columnSql + ' IS ').append(encoded);
7290
7290
  }
7291
+ else if (engine === 'sap' && column.tsType === 'DateColumn') {
7292
+ if (encoded.sql() === 'null') {
7293
+ command = command.append(separator + columnSql + ' IS NULL');
7294
+ }
7295
+ else {
7296
+ command = command.append(separator + column.formatOut(context) + '=').append(encoded);
7297
+ }
7298
+ }
7291
7299
  else if (engine === 'sap' && column.tsType === 'JSONColumn') {
7292
7300
  if (encoded.sql() === 'null') {
7293
7301
  command = command.append(separator + columnSql + ' IS NULL');
@@ -8234,6 +8242,11 @@ function requireNewSingleCommandCore () {
8234
8242
  if (engine === 'sqlite') {
8235
8243
  return newParameterized(columnSql + ' IS ' + encoded.sql(), encoded.parameters);
8236
8244
  }
8245
+ if (engine === 'sap' && column.tsType === 'DateColumn') {
8246
+ if (encoded.sql() === 'null')
8247
+ return newParameterized(columnSql + ' IS NULL');
8248
+ return newParameterized(column.formatOut(context) + '=' + encoded.sql(), encoded.parameters);
8249
+ }
8237
8250
  if (engine === 'sap' && column.tsType === 'JSONColumn') {
8238
8251
  if (encoded.sql() === 'null')
8239
8252
  return newParameterized(columnSql + ' IS NULL');
package/dist/index.mjs CHANGED
@@ -7289,6 +7289,14 @@ function requireNewUpdateCommandCore () {
7289
7289
  else if (engine === 'sqlite') {
7290
7290
  command = command.append(separator + columnSql + ' IS ').append(encoded);
7291
7291
  }
7292
+ else if (engine === 'sap' && column.tsType === 'DateColumn') {
7293
+ if (encoded.sql() === 'null') {
7294
+ command = command.append(separator + columnSql + ' IS NULL');
7295
+ }
7296
+ else {
7297
+ command = command.append(separator + column.formatOut(context) + '=').append(encoded);
7298
+ }
7299
+ }
7292
7300
  else if (engine === 'sap' && column.tsType === 'JSONColumn') {
7293
7301
  if (encoded.sql() === 'null') {
7294
7302
  command = command.append(separator + columnSql + ' IS NULL');
@@ -8235,6 +8243,11 @@ function requireNewSingleCommandCore () {
8235
8243
  if (engine === 'sqlite') {
8236
8244
  return newParameterized(columnSql + ' IS ' + encoded.sql(), encoded.parameters);
8237
8245
  }
8246
+ if (engine === 'sap' && column.tsType === 'DateColumn') {
8247
+ if (encoded.sql() === 'null')
8248
+ return newParameterized(columnSql + ' IS NULL');
8249
+ return newParameterized(column.formatOut(context) + '=' + encoded.sql(), encoded.parameters);
8250
+ }
8238
8251
  if (engine === 'sap' && column.tsType === 'JSONColumn') {
8239
8252
  if (encoded.sql() === 'null')
8240
8253
  return newParameterized(columnSql + ' IS NULL');
package/docs/changelog.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ## Changelog
2
+ __5.3.4__
3
+ SAP ASE: Fix optimistic concurrency for `date()` columns when datetime values are read back without millisecond precision.
2
4
  __5.3.3__
3
5
  MSSQL: Set `maxParameters` to `2098` because `tedious` adds extra parameters, so using `2100` can still exceed SQL Server's limit during `getMany`/`hasMany` loading.
4
6
  __5.3.2__
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orange-orm",
3
- "version": "5.3.3",
3
+ "version": "5.3.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -66,6 +66,11 @@ function newSingleCommandCore(context, table, filter, alias, concurrencyState) {
66
66
  if (engine === 'sqlite') {
67
67
  return newParameterized(columnSql + ' IS ' + encoded.sql(), encoded.parameters);
68
68
  }
69
+ if (engine === 'sap' && column.tsType === 'DateColumn') {
70
+ if (encoded.sql() === 'null')
71
+ return newParameterized(columnSql + ' IS NULL');
72
+ return newParameterized(column.formatOut(context) + '=' + encoded.sql(), encoded.parameters);
73
+ }
69
74
  if (engine === 'sap' && column.tsType === 'JSONColumn') {
70
75
  if (encoded.sql() === 'null')
71
76
  return newParameterized(columnSql + ' IS NULL');
@@ -90,6 +90,14 @@ function newUpdateCommandCore(context, table, columns, row, concurrencyState) {
90
90
  else if (engine === 'sqlite') {
91
91
  command = command.append(separator + columnSql + ' IS ').append(encoded);
92
92
  }
93
+ else if (engine === 'sap' && column.tsType === 'DateColumn') {
94
+ if (encoded.sql() === 'null') {
95
+ command = command.append(separator + columnSql + ' IS NULL');
96
+ }
97
+ else {
98
+ command = command.append(separator + column.formatOut(context) + '=').append(encoded);
99
+ }
100
+ }
93
101
  else if (engine === 'sap' && column.tsType === 'JSONColumn') {
94
102
  if (encoded.sql() === 'null') {
95
103
  command = command.append(separator + columnSql + ' IS NULL');