Method: PG::Connection#make_empty_pgresult
- Defined in:
- ext/pg_connection.c
#make_empty_pgresult(status) ⇒ PG::Result
Constructs and empty PG::Result with status status. status may be one of:
-
PGRES_EMPTY_QUERY -
PGRES_COMMAND_OK -
PGRES_TUPLES_OK -
PGRES_COPY_OUT -
PGRES_COPY_IN -
PGRES_BAD_RESPONSE -
PGRES_NONFATAL_ERROR -
PGRES_FATAL_ERROR -
PGRES_COPY_BOTH -
PGRES_SINGLE_TUPLE -
PGRES_TUPLES_CHUNK -
PGRES_PIPELINE_SYNC -
PGRES_PIPELINE_ABORTED
1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 |
# File 'ext/pg_connection.c', line 1645 static VALUE pgconn_make_empty_pgresult(VALUE self, VALUE status) { PGresult *result; VALUE rb_pgresult; PGconn *conn = pg_get_pgconn(self); result = PQmakeEmptyPGresult(conn, NUM2INT(status)); rb_pgresult = pg_new_result(result, self); pg_result_check(rb_pgresult); return rb_pgresult; } |