Alzabo::Runtime::JoinCursor - Cursor that returns arrays of Alzabo::Runtime::Row objects
Alzabo::Runtime::Row
use Alzabo::Runtime::JoinCursor; my $cursor = $schema->join( tables => [ $foo, $bar ], where => [ $foo->column('foo_id') => 1 ] ); while ( my @rows = $cursor->next_rows ) { print $row[0]->select('foo'), "\n"; print $row[1]->select('bar'), "\n"; }
Objects in this class are used to return arrays Alzabo::Runtime::Row objects when requested. The cursor does not preload objects but rather creates them on demand, which is much more efficient. For more details on the rational please see the HANDLING ERRORS section in Alzabo::Runtime::Cursor.
NOTE: This class is considered experimental.
Alzabo::Runtime::Cursor
statement => Alzabo::Driver::Statement object
Alzabo::Driver::Statement
tables => [ Alzabo::Table objects ]
Alzabo::Table
The next array of Alzabo::Runtime::Row objects or an empty list if no more are available.
This behavior can mask errors in your database's referntial integrity. For more information on how to deal with this see the HANDLING ERRORS section in Alzabo::Runtime::Cursor.
All the rows available from the current point onwards. These are returned as an array of array references. Each reference is to an array of Alzabo::Runtime::Row objects.
This means that if there are five set of rows that will be returned when the object is created and you call next_rows twice, calling all_rows after it will only return three sets. Calling the errors method after this will return all errors trapped during the fetching of these sets of rows. The return value is an array of array references. Each of these references represents a single set of rows as they would be returned from the next_rows method.
next_rows
all_rows
errors
See Alzabo::Runtime::Cursor.
Resets the cursor so that the next next_rows call will return the first row of the set.
Dave Rolsky, <autarch@urth.org>
To install Alzabo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Alzabo
CPAN shell
perl -MCPAN -e shell install Alzabo
For more information on module installation, please visit the detailed CPAN module installation guide.