grouping - work with datetimes

This commit is contained in:
Jan Prochazka
2020-06-21 21:44:54 +02:00
parent 9cd2e68f0b
commit 72d38e4b8c
11 changed files with 164 additions and 15 deletions

View File

@@ -1,6 +1,8 @@
import { TableInfo } from './dbinfo';
import { SqlDialect } from './dialect';
export type TransformType = 'GROUP:YEAR' | 'GROUP:MONTH' | 'GROUP:DAY' | 'YEAR' | 'MONTH' | 'DAY'; // | 'GROUP:HOUR' | 'GROUP:MINUTE';
export interface SqlDumper {
s: string;
dialect: SqlDialect;
@@ -10,6 +12,7 @@ export interface SqlDumper {
putCmd(format: string, ...args);
putValue(value: string | number | Date);
putCollection<T>(delimiter: string, collection: T[], lambda: (item: T) => void);
transform(type: TransformType, dumpExpr: () => void);
endCommand();
createTable(table: TableInfo);