node-pg
v1.0.1
Published
pg-promise for es7 async / await
Downloads
441
Readme
node-pg.js
API
declare class DbCtx { constructor (connection: DbConnection);
selectAsync<T extends BusinessObject>(entity: string, filter: T): Promise<T[]>;
deleteAsync<T extends BusinessObject>(entity: string, filter: T);
insertAsync<T extends BusinessObject>(entity: string, obj: T);
updateAsync<T extends BusinessObject>(entity: string, obj: T);
saveAsync<T extends BusinessObject>(entity: string, obj: T);
execProcedureAsync(procedureName: string, argsArray: any[]): Promise<any>;
execSqlAsync(sql: string): Promise<any>;
}
declare interface DbConnection { user: string, password: string, database: string, host: string, port: number }
declare interface BusinessObject { id: number }