DBIx::DataModel::Statement::Oracle - Statement for interacting with DBD::Oracle in Oracle versions prior to 12c
DBIx::DataModel->Schema("MySchema", statement_class => "DBIx::DataModel::Statement::Oracle", ); my $rows = $source->select( ..., -limit => 50, -offset => 200, );
This subclass redefines some parent methods from DBIx::DataModel::Statement in order to take advantage of "Scrollable Cursor Methods" in DBD::Oracle.
This was interesting in ancient Oracle databases, for applications that needed to do pagination within result sets. In versions prior to 12c, Oracle had no support for LIMIT/OFFSET in SQL, so this subclass uses some special methods of the Oracle driver to jump to a specific row within a resultset, and then extract a limited number of rows. The API is exactly the same as other, regular DBIx::DataModel implementations.
This mechanism will also work in Oracle versions 12c or superior, but it is no longer needed in recent Oracle databases; instead, activate the Oracle12c dialect in SQL::Abstract::More, like this :
Oracle12c
DBIx::DataModel->Schema("MySchema", sql_abstract_args => [sql_dialect => "Oracle12c"], );
Laurent Dami, <laurent.dami AT etat ge ch>, April 2012.
Copyright 2011 by Laurent Dami.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
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.