Constructors
constructor
- new PgHelper(pooConfig: PoolConfig, options?: Options): PgHelper
-
Parameters
-
pooConfig: PoolConfig
-
Optional options: Options
Properties
Private autoHump
autoHump: boolean
Private logger
logger: Logger
Private pooConfig
pooConfig: PoolConfig
Private returning
returning: boolean
Methods
delete
- delete(params: SqlTempParams, options: DeleteOptions): Promise<QueryResult>
-
Parameters
-
params: SqlTempParams
-
options: DeleteOptions
Returns Promise<QueryResult>
getClient
- getClient(): Promise<any>
getTransaction
- getTransaction(): Promise<any>
insert
- insert(params: Insert, options: InsertOptions): Promise<QueryResult>
-
Parameters
-
params: Insert
-
options: InsertOptions
Returns Promise<QueryResult>
runSql
- runSql(sqlTemp: string, sqlParams?: SqlTempParams, options?: SqlOptions): Promise<QueryResult>
-
Parameters
-
sqlTemp: string
-
Optional sqlParams: SqlTempParams
-
Optional options: SqlOptions
Returns Promise<QueryResult>
runTSql
- runTSql(sqlTemps: TSqlTempParams[], options?: SqlOptions): Promise<QueryResult[]>
-
Parameters
-
sqlTemps: TSqlTempParams[]
-
Optional options: SqlOptions
Returns Promise<QueryResult[]>
select
- select(params: SqlTempParams, options: SelectOptions): Promise<QueryResult>
-
Parameters
-
params: SqlTempParams
-
options: SelectOptions
Returns Promise<QueryResult>
update
- update(params: SqlTempParams, options: UpdateOptions): Promise<QueryResult>
-
Parameters
-
params: SqlTempParams
-
options: UpdateOptions
Returns Promise<QueryResult>
build delete sql