Switch to postgres + promises

This commit is contained in:
Ajay Ramachandran
2021-03-01 20:40:31 -05:00
parent 9a9038d5e0
commit ff4af3786e
37 changed files with 424 additions and 291 deletions

View File

@@ -1,13 +1,7 @@
export interface IDatabase {
init(): void;
prepare(type: QueryType, query: string, params: any[]): any;
get<TModel>(query: string, params: any[]): TModel;
getAll<TModel>(query: string, params: any[]): TModel[];
run(query: string, params: any[]): void;
exec(query: string): any;
prepare(type: QueryType, query: string, params: any[]): Promise<any | any[] | void>;
}
export type QueryType = 'get' | 'all' | 'run';