DBIx::DataModel::Statement::JDBC - Statement for interacting with DBD::JDBC
When defining the DBIx::DataModel Schema :
DBIx::DataModel->Schema("MySchema", statement_class => "DBIx::DataModel::Statement::JDBC", );
When using the schema:
my $statement = $source->select(..., -result_as => 'statement'); my $n_rows = $statement->size; # size of result set my $row_1 = $statement->next; # record N° 1; $statement->relative(15); # move down 15 records my $row_16 = $statement->next; # record N° 16 $statement->beforeFirst; # back to beginning of result set
Scrollable statement for DBD::JDBC datasources. Provides an interface layer to some JDBC methods on Java ResultSet and Statement objects.
ResultSet
Statement
Calls to the following Java methods are encapsulated in the statement class. See the JDBC javadoc for details:
number of members in the resultset.
current number of rows in the resultset (may be smaller than memberCount if the resultset was restricted through setMaxRows).
memberCount
setMaxRows
index of the current record in the resultset.
$statement->relative($delta)
Move the statement $delta rows from the current position ($delta may be positive or negative).
$delta
$statement->absolute($row_index)
Move the statement at position $row_index.
$row_index
$statement->setMaxRows($max)
Limits the number of rows in ResultSet. Further rows are silently ignored.
To install DBIx::DataModel, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::DataModel
CPAN shell
perl -MCPAN -e shell install DBIx::DataModel
For more information on module installation, please visit the detailed CPAN module installation guide.