Dave Rolsky > Fey-ORM-0.05 > Fey::ORM::Schema

Download:
Fey-ORM-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source   Latest Release: Fey-ORM-0.30

NAME ^

Fey::ORM::Schema - Provides sugar for schema-based classes

SYNOPSIS ^

  package MyApp::Schema;

  use Fey::ORM::Schema;

  has_schema ...;

  no Fey::ORM::Schema;

DESCRIPTION ^

Use this class to associate your class with a schema. It exports a number of sugar functions to allow you to define things in a declarative manner.

EXPORTED FUNCTIONS ^

This package exports the following functions:

has_schema($schema)

Given a Fey::Schema object, this method associates that schema with the calling class.

Calling this function generates several methods and attributes in the calling class:

CallingClass->Schema()

Returns the Fey::Schema object associated with the class.

CallingClass->DBIManager()

Returns the Fey::Schema object associated with the class.

CallingClass->SetDBIManager($manager)

Set the Fey::DBIManager object associated with the class. If you don't set one explicitly, then the first call to CallingClass->DBIManager() will simply create one by calling Fey::DBIManager->new().

CallingClass->SQLFactoryClass()

Returns the SQL factory class associated with the class. This defaults to Fey::SQL.

CallingClass->SetSQLFactoryClass()

Set the SQL factory class associated with the class.

AUTHOR ^

Dave Rolsky, <autarch@urth.org>

BUGS ^

See Fey::ORM for details.

COPYRIGHT & LICENSE ^

Copyright 2006-2008 Dave 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.