SQL::DB::Cursor - SQL::DB database cursor


SQL-DB documentation  | view source Contained in the SQL-DB distribution.

Index


NAME

Top

SQL::DB::Cursor - SQL::DB database cursor

SYNOPSIS

Top

  use SQL::DB::Cursor;
  my $cursor = SQL::DB::Cursor->new($sth, $class);

  while (my $next = $cursor->next) {
    print $next->column()
  }

DESCRIPTION

Top

SQL::DB::Cursor is a cursor interface to DBI. It is typically only used by the SQL::DB fetch() method, and in user code.

METHODS

Top

new($sth,$class)

Create a new cursor object. $sth is a DBI statement handle (ie the result of a DBI->execute call). $class must be the result of a SQL::DB::Row make_class_from() method call.

next

Returns the next row from the database as an object of type $class. Returns undef when no data is left. Croaks on failure.

PRIATE METHODS

Top

_finish

Calls finish() on the DBI statement handle.

AUTHOR

Top

Mark Lawrence <nomad@null.net>

COPYRIGHT AND LICENSE

Top


SQL-DB documentation  | view source Contained in the SQL-DB distribution.