mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 15:25:59 +00:00
Merge branch 'master' into develop
This commit is contained in:
@@ -28,6 +28,12 @@ export function dumpSqlExpression(dmp: SqlDumper, expr: Expression) {
|
||||
dmp.put('%s', expr.sql);
|
||||
break;
|
||||
|
||||
case 'unaryRaw':
|
||||
if (expr.beforeSql) dmp.putRaw(expr.beforeSql);
|
||||
dumpSqlExpression(dmp, expr.expr);
|
||||
if (expr.afterSql) dmp.putRaw(expr.afterSql);
|
||||
break;
|
||||
|
||||
case 'call':
|
||||
dmp.put('%s(', expr.func);
|
||||
if (expr.argsPrefix) dmp.put('%s ', expr.argsPrefix);
|
||||
@@ -36,7 +42,7 @@ export function dumpSqlExpression(dmp: SqlDumper, expr: Expression) {
|
||||
break;
|
||||
|
||||
case 'methodCall':
|
||||
dumpSqlExpression(dmp, expr.thisObject)
|
||||
dumpSqlExpression(dmp, expr.thisObject);
|
||||
dmp.put('.%s(', expr.method);
|
||||
dmp.putCollection(',', expr.args, x => dumpSqlExpression(dmp, x));
|
||||
dmp.put(')');
|
||||
|
||||
@@ -176,6 +176,13 @@ export interface RawExpression {
|
||||
sql: string;
|
||||
}
|
||||
|
||||
export interface UnaryRawExpression {
|
||||
exprType: 'unaryRaw';
|
||||
expr: Expression;
|
||||
beforeSql?: string;
|
||||
afterSql?: string;
|
||||
}
|
||||
|
||||
export interface CallExpression {
|
||||
exprType: 'call';
|
||||
func: string;
|
||||
@@ -206,6 +213,7 @@ export type Expression =
|
||||
| ValueExpression
|
||||
| PlaceholderExpression
|
||||
| RawExpression
|
||||
| UnaryRawExpression
|
||||
| CallExpression
|
||||
| MethodCallExpression
|
||||
| TranformExpression
|
||||
|
||||
Reference in New Issue
Block a user