load row count

This commit is contained in:
Jan Prochazka
2020-04-14 19:37:31 +02:00
parent 7137c4a1d4
commit 113016c25c
4 changed files with 64 additions and 3 deletions

View File

@@ -23,5 +23,9 @@ export function dumpSqlExpression(dmp: SqlDumper, expr: Expression) {
case 'value':
dmp.put('%v', expr.value);
break;
case 'raw':
dmp.put('%s', expr.sql);
break;
}
}

View File

@@ -112,7 +112,12 @@ export interface PlaceholderExpression {
exprType: 'placeholder';
}
export type Expression = ColumnRefExpression | ValueExpression | PlaceholderExpression;
export interface RawExpression {
exprType: 'raw';
sql: string;
}
export type Expression = ColumnRefExpression | ValueExpression | PlaceholderExpression | RawExpression;
export type OrderByExpression = Expression & { direction: 'ASC' | 'DESC' };
export type ResultField = Expression & { alias?: string };