Class: OCI8::Cursor

Inherits:
ACIHandle show all
Defined in:
ext/oci8/stmt.c

Instance Method Summary collapse

Instance Method Details

#rowidString

Gets the rowid of the last inserted, updated or deleted row. This cannot be used for select statements.

Examples:

cursor = conn.parse('INSERT INTO foo_table values(:1, :2)', 1, 2)
cursor.exec
cursor.rowid # => "AAAFlLAAEAAAAG9AAA", the inserted row's rowid

Returns:



356
357
358
359
360
# File 'ext/oci8/stmt.c', line 356

static VALUE oci8_stmt_get_rowid(VALUE self)
{
    oci8_base_t *base = oci8_check_typeddata(self, &oci8_stmt_data_type, 1);
    return oci8_get_rowid_attr(base, ACI_ATTR_ROWID, base->hp.stmt);
}