1.0.1 • Published 7 years ago

node-pg v1.0.1

Weekly downloads
146
License
ISC
Repository
github
Last release
7 years ago

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 }