Method: Mysql2::Client#affected_rows
- Defined in:
- ext/mysql2/client.c
#affected_rows ⇒ Object
returns the number of rows changed, deleted, or inserted by the last statement if it was an UPDATE, DELETE, or INSERT.
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 |
# File 'ext/mysql2/client.c', line 1162 static VALUE rb_mysql_client_affected_rows(VALUE self) { uint64_t retVal; GET_CLIENT(self); REQUIRE_CONNECTED(wrapper); retVal = wrapper->affected_rows; if (retVal == (uint64_t)-1) { rb_raise_mysql2_error(wrapper); } return ULL2NUM(retVal); } |