mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 01:55:59 +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);
|
||||
dmp.put(' ^in (%,v)', condition.values);
|
||||
break;
|
||||
case 'notIn':
|
||||
dumpSqlExpression(dmp, condition.expr);
|
||||
dmp.put(' ^not ^in (%,v)', condition.values);
|
||||
break;
|
||||
case 'rawTemplate':
|
||||
let was = false;
|
||||
for (const item of condition.templateSql.split('$$')) {
|
||||
|
||||
@@ -106,6 +106,12 @@ export interface InCondition {
|
||||
values: any[];
|
||||
}
|
||||
|
||||
export interface NotInCondition {
|
||||
conditionType: 'notIn';
|
||||
expr: Expression;
|
||||
values: any[];
|
||||
}
|
||||
|
||||
export interface RawTemplateCondition {
|
||||
conditionType: 'rawTemplate';
|
||||
templateSql: string;
|
||||
@@ -127,6 +133,7 @@ export type Condition =
|
||||
| NotExistsCondition
|
||||
| BetweenCondition
|
||||
| InCondition
|
||||
| NotInCondition
|
||||
| RawTemplateCondition
|
||||
| AnyColumnPassEvalOnlyCondition;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user