unified prettier

This commit is contained in:
Jan Prochazka
2020-03-05 13:32:42 +01:00
parent 9ef719ec95
commit ffe8f1027f
12 changed files with 88 additions and 100 deletions

View File

@@ -1,17 +1,17 @@
import { SqlDumper } from "@dbgate/types";
import { Expression, ColumnRefExpression } from "./types";
import { dumpSqlSourceRef } from "./dumpSqlSource";
import { SqlDumper } from '@dbgate/types';
import { Expression, ColumnRefExpression } from './types';
import { dumpSqlSourceRef } from './dumpSqlSource';
export function dumpSqlExpression(dmp: SqlDumper, expr: Expression) {
switch (expr.exprType) {
case "column":
case 'column':
{
if (expr.source) {
if (dumpSqlSourceRef(dmp, expr.source)) {
dmp.put(".");
dmp.put('.');
}
}
dmp.put("%i", expr.columnName);
dmp.put('%i', expr.columnName);
}
break;
}