mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 17:24:00 +00:00
sqltree: notIn support
This commit is contained in:
@@ -72,6 +72,10 @@ export function dumpSqlCondition(dmp: SqlDumper, condition: Condition) {
|
|||||||
dumpSqlExpression(dmp, condition.expr);
|
dumpSqlExpression(dmp, condition.expr);
|
||||||
dmp.put(' ^in (%,v)', condition.values);
|
dmp.put(' ^in (%,v)', condition.values);
|
||||||
break;
|
break;
|
||||||
|
case 'notIn':
|
||||||
|
dumpSqlExpression(dmp, condition.expr);
|
||||||
|
dmp.put(' ^not ^in (%,v)', condition.values);
|
||||||
|
break;
|
||||||
case 'rawTemplate':
|
case 'rawTemplate':
|
||||||
let was = false;
|
let was = false;
|
||||||
for (const item of condition.templateSql.split('$$')) {
|
for (const item of condition.templateSql.split('$$')) {
|
||||||
|
|||||||
@@ -106,6 +106,12 @@ export interface InCondition {
|
|||||||
values: any[];
|
values: any[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface NotInCondition {
|
||||||
|
conditionType: 'notIn';
|
||||||
|
expr: Expression;
|
||||||
|
values: any[];
|
||||||
|
}
|
||||||
|
|
||||||
export interface RawTemplateCondition {
|
export interface RawTemplateCondition {
|
||||||
conditionType: 'rawTemplate';
|
conditionType: 'rawTemplate';
|
||||||
templateSql: string;
|
templateSql: string;
|
||||||
@@ -127,6 +133,7 @@ export type Condition =
|
|||||||
| NotExistsCondition
|
| NotExistsCondition
|
||||||
| BetweenCondition
|
| BetweenCondition
|
||||||
| InCondition
|
| InCondition
|
||||||
|
| NotInCondition
|
||||||
| RawTemplateCondition
|
| RawTemplateCondition
|
||||||
| AnyColumnPassEvalOnlyCondition;
|
| AnyColumnPassEvalOnlyCondition;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user