Runs SQL that may hold several statements (the simple query protocol) and reports each
statement's outcome to hooks. The returned error is the one that stopped the script, after the
results of the statements before it were reported. Without an explicit BEGIN the whole string
runs as one implicit transaction.
- c: the connection.
- sql: the statements, separated by semicolons.
- hooks: what to do with results and COPY data. Null discards all rows.
run_script :: (c: *Connection, sql: string, hooks: *Script_Hooks) -> Pg_Error
Runs SQL that may hold several statements (the simple query protocol) and reports each
statement's outcome to hooks. The returned error is the one that stopped the script, after the
results of the statements before it were reported. Without an explicit BEGIN the whole string
runs as one implicit transaction.
Parameters
- c: *Connection
- the connection.
- sql: string
- the statements, separated by semicolons.
- hooks: *Script_Hooks
- what to do with results and COPY data. Null discards all rows.