++ed by:
KEEDI AWNCORP PERLANCAR

3 PAUSE users
7 non-PAUSE users.

Laurent Dami
and 1 contributors

NAME

DBIx::DataModel::Statement::Oracle - Statement for interacting with DBD::Oracle

SYNOPSIS

  DBIx::DataModel->Schema("MySchema",
     statement_class => "DBIx::DataModel::Statement::Oracle",
  );

  my $statement = $source->select(
    ..., 
    -limit => 50, 
    -offset => 200,
    -result_as => 'statement,
  );
  my $total_rows = $statement->row_count;
  my $row_slice  = $statement->all;

DESCRIPTION

This subclass redefines some parent methods from DBIx::DataModel::Statement in order to take advantage of "Scrollable Cursor Methods" in DBD::Oracle.

This is interesting for applications that need to do pagination within result sets, because Oracle has no support for LIMIT/OFFSET in SQL. So here we use some special methods of the Oracle driver to retrieve the total number of rows in a resultset, or to extract a given slice of rows.

The API is exactly the same as other, regular DBIx::DataModel implementations.

AUTHOR

Laurent Dami, <laurent.dami AT etat ge ch>, Dec 2011.

COPYRIGHT AND LICENSE

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.