method

execute

Importance_1
v7.1.3.2 - Show latest stable - 0 notes - Class: DatabaseStatements
execute(...) public

Executes an SQL statement, returning a PG::Result object on success or raising a PG::Error exception otherwise.

Setting allow_retry to true causes the db to reconnect and retry executing the SQL statement in case of a connection-related exception. This option should only be enabled for known idempotent queries.

Note: the PG::Result object is manually memory managed; if you don’t need it specifically, you may want consider the exec_query wrapper.

Show source
Register or log in to add new notes.