mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
sqltree: notIn support
This commit is contained in:
parent
50b64cf0c6
commit
85a43c7a5b
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user