Method: PG::Result#cmd_tuples
- Defined in:
- ext/pg_result.c
#cmd_tuples ⇒ Fixnum Also known as: cmdtuples
Returns the number of tuples (rows) affected by the SQL command.
If the SQL command that generated the PG::Result was not one of:
-
INSERT
-
UPDATE
-
DELETE
-
MOVE
-
FETCH
or if no tuples were affected, 0
is returned.
674 675 676 677 678 679 680 |
# File 'ext/pg_result.c', line 674
static VALUE
pgresult_cmd_tuples(VALUE self)
{
long n;
n = strtol(PQcmdTuples(pgresult_get(self)),NULL, 10);
return INT2NUM(n);
}
|