Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

alzabo::runtime::joincursor(3pm) [debian man page]

Alzabo::Runtime::JoinCursor(3pm)			User Contributed Perl Documentation			  Alzabo::Runtime::JoinCursor(3pm)

NAME
Alzabo::Runtime::JoinCursor - Cursor that returns arrays of "Alzabo::Runtime::Row" objects SYNOPSIS
use Alzabo::Runtime::JoinCursor; my $cursor = $schema->join( tables => [ $foo, $bar ], where => [ $foo->column('foo_id'), '=', 1 ] ); while ( my @rows = $cursor->next ) { print $rows[0]->select('foo'), " "; print $rows[1]->select('bar'), " "; } DESCRIPTION
Objects in this class are used to return arrays of 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 RATIONALE FOR CURSORS section in Alzabo::Design. INHERITS FROM
"Alzabo::Runtime::Cursor" METHODS
next Returns the next array of "Alzabo::Runtime::Row" objects or an empty list if no more are available. If an individual row could not be fetched, then the array may contain some "undef" values. For outer joins, this is normal behavior, but for regular joins, this probably indicates a data error. all_rows This method fetches all the rows available from the current point onwards. This means that if there are five set of rows that will be returned when the object is created and you call "next()" twice, calling "all_rows()" after it will only return three sets. 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" method. reset Resets the cursor so that the next "next()" call will return the first row of the set. count Returns the number of rowsets returned by the cursor so far. next_as_hash Returns the next rows in a hash, where the hash keys are the table names and the hash values are the row object. If a table has been included in the join via an outer join, then it is only included in the hash if there is a row for that table. AUTHOR
Dave Rolsky, <autarch@urth.org> perl v5.8.8 2007-12-23 Alzabo::Runtime::JoinCursor(3pm)

Check Out this Related Man Page

Alzabo(3pm)						User Contributed Perl Documentation					       Alzabo(3pm)

NAME
Alzabo - A data modelling tool and RDBMS-OO mapper SYNOPSIS
Cannot be summarized here. DESCRIPTION
What is Alzabo? Alzabo is a suite of modules with two core functions. Its first use is as a data modelling tool. Through either a schema creation GUI, a perl program, or reverse engineering, you can create a set objects to represent a schema. Its second function is as an RDBMS to object mapping system. Once you have created a schema, you can use the "Alzabo::Runtime::Table" and "Alzabo::Runtime::Row" classes to access its data. These classes offer a high level interface to common operations such as SQL "SELECT", "INSERT", "DELETE", and "UPDATE" commands. Because you can manipulate construct queries through object-oriented Perl, creating complex queries on the fly is much easier than it would be if you had to dynamically construct strings of SQL. A higher level interface can be created through the use of the "Alzabo::MethodMaker" module. This module takes a schema object and auto- generates useful methods based on the tables, columns, and relationships it finds in the module. The code is generates can be integrated with your own code quite easily. To take it a step further, you could then aggregate a set of rows from different tables into a larger container object which could under- stand the logical relationship between these tables. What to Read? Alzabo has a lot of documentation. If you are primarily interested in using Alzabo as an RDBMS-OO wrapper, much of the documentation can be skipped. This assumes that you will create your schema via a schema creation GUI or via reverse engineering. Here is the suggested reading order: Introduction to Alzabo The RDBMS-specific documentation: Alzabo and MySQL Alzabo and PostgreSQL The Alzabo::Runtime::Schema docs - The most important parts here are those related to loading a schema and connecting to a database. Also be sure to read about the "join()" method. The Alzabo::Runtime::Table docs - This contains most of the methods used to fetch rows from the database, as well as the "insert()" method. The Alzabo::Runtime::Row docs - The row objects contain the methods used to update, delete, and retrieve data from the database. The Alzabo::Runtime::RowCursor docs - A cursor object that returns only a single row. The Alzabo::Runtime::JoinCursor docs - A cursor object that returns multiple rows at once. The Alzabo::MethodMaker docs - One of the most useful parts of Alzabo. This module can be used to auto-generate methods based on the structure of your schema. The Alzabo::Runtime::UniqueRowCache docs - This describes the simple caching system included with Alzabo. The Alzabo::Debug docs - How to turn on various kinds of debugging output. The Alzabo::Exceptions docs - Describes the nature of all the exceptions used in Alzabo. The FAQ. The quick reference - A quick reference for the various methods of the Alzabo objects. SCRIPTS
Alzabo comes with a few handy scripts in the eg/ directory of the distribution. These are: * alzabo_grep Given a regex and a schema name, this script will print out the table and column name for all columns which match the regex. * alzabo_to_ascii Given a schema name, this script will generate a set of simple ASCII tables for the schema. SUPPORT
The Alzabo docs are conveniently located online at http://www.alzabo.org/docs/. There is also a mailing list. You can sign up at http://lists.sourceforge.net/lists/listinfo/alzabo-general. Please don't email me directly. Use the list instead so others can see your questions. COPYRIGHT
Copyright (c) 2000-2003 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. AUTHOR
Dave Rolsky, <autarch@urth.org> perl v5.8.8 2007-12-23 Alzabo(3pm)
Man Page