Class | DBI::BaseStatement |
In: |
lib/dbi/base_classes/statement.rb
|
Parent: | Base |
StatementHandles are used to encapsulate the process of managing a statement (DDL or DML) and its parameters, sending it to the database, and gathering any results from the execution of that statement.
As with the other `Base` classes, the terms "DBD Required" and "DBD Optional" are defined in DBI::BaseDatabase.
raise_error | [RW] |
Bind a parameter to the statement. DBD Required.
The parameter number is numeric and indexes starting at 1. This corresponds to the question marks (?) in the statement from the left-most part of the statement moving forward.
The value may be any ruby type. How these are handled is DBD-dependent, but the vast majority of DBDs will convert these to string inside the query.
Cancel any result cursors. DBD Optional, but intentionally does not raise any exception as it‘s used internally to maintain consistency.
returns result-set column information as array of hashs, where each hash represents one column. See BaseDatabase#columns. DBD Required.
Fetch the next row in the result set. DBD Required.
DBI::Row is responsible for formatting the data the DBD provides it.
fetch_scroll is provided with a direction and offset and works similar to how seek() is used on files.
The constants available for direction are as follows:
Other constants can be used, but if this method is not supplied by the driver, they will result in a raise of DBI::NotSupportedError.