Constructs a new Query object, reusing the last opened connection. Will fail if no connection has been established.
Like the above constructor, except it also accepts a Connection as the first param. A copy of the Connection is not made.
Add a param to the list of params that will be sent with the query. It's probably a better idea to just use run function with all the values, but in some cases, adding params one by one can result in a more readable code.
Sets the query's command and resets the params. Connection is not affected Useful if you want to reuse the same query object.
In reality just an alias to addParam, but can be chained to add multiple params.
Runs the Query, returning a Result object. Optionally accepts a list of params for the query to be ran with. The params are added to the query, and if the query is re-ran for the second time, do not need to be added again.
ditto, async
A getter/setter pair for the command that will be executed.
A setter for the connection.
A nice wrapper around various DB querying functions, to fill even everyday PostgreSQL querying with joy.