-
Notifications
You must be signed in to change notification settings - Fork 2
DbClientPg
do- edited this page Jan 7, 2023
·
74 revisions
DbClientPg is a thin wrapper above the native PostgreSQL client designed for using in doix Jobs.
Instances are created by DbPoolPg objects, part of Application. Application developers should never instantiate those objects directly.
| Name | Description |
|---|---|
uuid |
The unique ID of this client, mainly for logging purposes |
raw |
The pg.Client instance used by this wrapper |
| Name | Payload | Description |
|---|---|---|
start |
{sql, params} |
emitted before executing any database query. |
error |
the error caught | emitted when an error occurs while executing a query |
finish |
emitted right after the query execution is terminated (one way or another) |
This asynchronous method executes the given sql with the given params list. Basically it forwards the call to the native client.query returning the same result or throwing the same error.