mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 03:45:59 +00:00
conditionType expression
This commit is contained in:
@@ -68,6 +68,9 @@ export function dumpSqlCondition(dmp: SqlDumper, condition: Condition) {
|
||||
dmp.put(' ^and ');
|
||||
dumpSqlExpression(dmp, condition.right);
|
||||
break;
|
||||
case 'expression':
|
||||
dumpSqlExpression(dmp, condition.expr);
|
||||
break;
|
||||
case 'in':
|
||||
dumpSqlExpression(dmp, condition.expr);
|
||||
dmp.put(' ^in (%,v)', condition.values);
|
||||
|
||||
@@ -57,6 +57,11 @@ export interface UnaryCondition {
|
||||
expr: Expression;
|
||||
}
|
||||
|
||||
export interface ExpressionCondition extends UnaryCondition {
|
||||
// not in standard SQL
|
||||
conditionType: 'expression';
|
||||
}
|
||||
|
||||
export interface BinaryCondition {
|
||||
conditionType: 'binary';
|
||||
operator: '=' | '!=' | '<>' | '<' | '>' | '>=' | '<=';
|
||||
@@ -141,7 +146,8 @@ export type Condition =
|
||||
| NotInCondition
|
||||
| RawTemplateCondition
|
||||
| AnyColumnPassEvalOnlyCondition
|
||||
| SpecificPredicateCondition;
|
||||
| SpecificPredicateCondition
|
||||
| ExpressionCondition;
|
||||
|
||||
export interface Source {
|
||||
name?: NamedObjectInfo;
|
||||
|
||||
Reference in New Issue
Block a user