The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

SYNOPSIS

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

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

DESCRIPTION

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

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

_finish

Calls finish() on the DBI statement handle.

AUTHOR

Mark Lawrence <nomad@null.net>

COPYRIGHT AND LICENSE

Copyright (C) 2007,2008 Mark Lawrence <nomad@null.net>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.