Dave Rolsky > Alzabo-0.92 > Alzabo::QuickRef

Download:
Alzabo-0.92.tar.gz

Annotate this POD

CPAN RT

New  4
Open  1
View/Report Bugs
Source  

NAME ^

Alzabo::QuickRef - A quick reference to methods in the Alzabo classes

GENERAL ^

This reference is intended to provide a quick reference to some of the more commonly used methods that Alzabo provides. In addition, this reference can give you an idea of what classes contain certain types of methods, so you have an idea of where to look in order to figure out how to achieve a certain task.

Alzabo, Alzabo::Create, and Alzabo::Runtime

These modules are mostly used just to load other modules. The Alzabo::Runtime module can be used to preload schemas at compile time by doing:

  use Alzabo::Runtime qw( schema1 schema2 schema3 );

Alzabo::MethodMaker

This module can be used to generate many useful convenience methods. This is done by auto-generating methods in new packages and re-blessing some of the schema objects into these packages. To have it generate all the possible methods for a schema you would do:

  use Alzabo::MethodMaker ( schema => 'some_schema',
                            # Root for new packages
                            class_root => 'My::Data',
                            # Make all possible methods
                            all => 1 );

This will make convenience methods for such things as getting table and column objects, following various types of foreign keys, and getting data from row objects.

METHODS ^

Retrieving data

Alzabo::Runtime::Schema

This object allows you to connect to the database. It contains several data retrieval methods including join.

Alzabo::Runtime::Table

Objects in this class have methods allowing you to insert new rows as well as retrieving exist data in the form of Alzabo::Runtime::Row or Alzabo::Runtime::RowCursor objects.

All methods that return a single row return an Alzabo::Runtime::Row object.

All methods that return multiple rows return an Alzabo::Runtime::RowCursor object.

All methods that return rows can be given the no_cache parameter, which ensures that the row(s) returned will not be cached. Rows obtained in this manner should not be updated or deleted, as this will play havoc with the caching system. See the Alzabo::Runtime::Row documentation for more details.

All methods that return multiple rows in the form of a cursor object can take an order_by parameter. See the Alzabo::Runtime::Table documentation for more details.

Alzabo::Runtime::Row

Objects in this class represent a single row of data. You can retrieve the actual column values from it, update it, or delete it.

Alzabo::Runtime::RowCursor

Objects in this class are used to return multiple rows as a cursor, rather than as a list. This is much more efficient, at the expense of a few extra lines in your code.

Creating/removing a schema

Alzabo::Create::Schema

This object represents a schema, and contains one or more table objects. It is only used when creating or altering a schema, as opposed to when fetching data. Data manipulation is done via the Alzabo::Runtime::* classes.

AUTHOR ^

Dave Rolsky, <autarch@urth.org>

syntax highlighting: