node-pg

1.0.1 • Public • Published

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 }

Readme

Keywords

none

Package Sidebar

Install

npm i node-pg

Weekly Downloads

15

Version

1.0.1

License

ISC

Last publish

Collaborators

  • prmph