dbgate-sqltree 5.1.0 → 5.1.2

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.
@@ -72,6 +72,16 @@ function dumpSqlCondition(dmp, condition) {
72
72
  (0, dumpSqlExpression_1.dumpSqlExpression)(dmp, condition.expr);
73
73
  dmp.put(' ^in (%,v)', condition.values);
74
74
  break;
75
+ case 'rawTemplate':
76
+ let was = false;
77
+ for (const item of condition.templateSql.split('$$')) {
78
+ if (was) {
79
+ (0, dumpSqlExpression_1.dumpSqlExpression)(dmp, condition.expr);
80
+ }
81
+ dmp.putRaw(item);
82
+ was = true;
83
+ }
84
+ break;
75
85
  }
76
86
  }
77
87
  exports.dumpSqlCondition = dumpSqlCondition;
package/lib/types.d.ts CHANGED
@@ -81,7 +81,12 @@ export interface InCondition {
81
81
  expr: Expression;
82
82
  values: any[];
83
83
  }
84
- export declare type Condition = BinaryCondition | NotCondition | TestCondition | CompoudCondition | LikeCondition | ExistsCondition | NotExistsCondition | BetweenCondition | InCondition;
84
+ export interface RawTemplateCondition {
85
+ conditionType: 'rawTemplate';
86
+ templateSql: string;
87
+ expr: Expression;
88
+ }
89
+ export declare type Condition = BinaryCondition | NotCondition | TestCondition | CompoudCondition | LikeCondition | ExistsCondition | NotExistsCondition | BetweenCondition | InCondition | RawTemplateCondition;
85
90
  export interface Source {
86
91
  name?: NamedObjectInfo;
87
92
  alias?: string;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.1.0",
2
+ "version": "5.1.2",
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": "^5.1.0",
30
+ "dbgate-types": "^5.1.2",
31
31
  "typescript": "^4.4.3"
32
32
  },
33
33
  "dependencies": {