dbgate-sqltree 6.1.5 → 6.2.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.
@@ -56,6 +56,9 @@ function dumpSqlSelect(dmp, cmd) {
56
56
  if (dmp.dialect.offsetFetchRangeSyntax) {
57
57
  dmp.put('^offset %s ^rows ^fetch ^next %s ^rows ^only', cmd.range.offset, cmd.range.limit);
58
58
  }
59
+ else if (dmp.dialect.offsetNotSupported) {
60
+ dmp.put('^limit %s', cmd.range.limit + cmd.range.offset);
61
+ }
59
62
  else {
60
63
  dmp.put('^limit %s ^offset %s ', cmd.range.limit, cmd.range.offset);
61
64
  }
@@ -18,7 +18,15 @@ function dumpSqlExpression(dmp, expr) {
18
18
  dmp.putRaw('{PLACEHOLDER}');
19
19
  break;
20
20
  case 'value':
21
- dmp.put('%v', expr.value);
21
+ if (expr.dataType) {
22
+ dmp.put('%V', {
23
+ value: expr.value,
24
+ dataType: expr.dataType,
25
+ });
26
+ }
27
+ else {
28
+ dmp.put('%v', expr.value);
29
+ }
22
30
  break;
23
31
  case 'raw':
24
32
  dmp.put('%s', expr.sql);
package/lib/types.d.ts CHANGED
@@ -128,6 +128,7 @@ export interface ColumnRefExpression {
128
128
  export interface ValueExpression {
129
129
  exprType: 'value';
130
130
  value: any;
131
+ dataType?: string;
131
132
  }
132
133
  export interface PlaceholderExpression {
133
134
  exprType: 'placeholder';
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "6.1.5",
2
+ "version": "6.2.0",
3
3
  "name": "dbgate-sqltree",
4
4
  "main": "lib/index.js",
5
5
  "typings": "lib/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "devDependencies": {
29
29
  "@types/node": "^13.7.0",
30
- "dbgate-types": "^6.1.5",
30
+ "dbgate-types": "^6.2.0",
31
31
  "typescript": "^4.4.3"
32
32
  },
33
33
  "dependencies": {