Class: PgClient

reactive-pg-client-js/pg_client~ PgClient

new PgClient()

Defines the client operations with a Postgres Database.
Source:

Methods

preparedBatch(sql, batch, handler) → {PgClient}

Prepare and execute a createBatch.
Parameters:
Name Type Description
sql string the prepared query SQL
batch Array.<Tuple> the batch of tuples
handler function the handler notified with the execution result
Source:
Returns:
a reference to this, so the API can be used fluently
Type
PgClient

preparedQuery(sql, arguments, handler) → {PgClient}

Prepare and execute a query.
Parameters:
Name Type Description
sql string the prepared query SQL
arguments Tuple the list of arguments
handler function the handler notified with the execution result
Source:
Returns:
a reference to this, so the API can be used fluently
Type
PgClient

query(sql, handler) → {PgClient}

Execute a simple query.
Parameters:
Name Type Description
sql string the query SQL
handler function the handler notified with the execution result
Source:
Returns:
a reference to this, so the API can be used fluently
Type
PgClient