Dave Rolsky > Fey-ORM-0.05 > Fey::Object::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::Object::Schema - Base class for schema-based objects

SYNOPSIS ^

  package MyApp::Schema;

  use Fey::ORM::Schema;

  has_schema(...);

DESCRIPTION ^

This class is a the base class for all schema-based objects.

METHODS ^

This class provides the following methods:

$class->EnableObjectCaches()

Enables the object class for all of the table classes associated with this class's schema.

$class->DisableObjectCaches()

Disables the object class for all of the table classes associated with this class's schema.

$class->ClearObjectCaches()

Clears the object class for all of the table classes associated with this class's schema.

$class->RunInTransaction( $coderef, $source )

Given a code ref, this method will begin a transaction and execute the coderef. If the coderef runs normally (no exceptions), it commits, otherwise it rolls back and rethrows the error.

This method will handle nested transactions gracefully if your DBMS does not. It doesn't emulate actual partial commits, but it does prevent DBI from throwing an error.

The second argument can be a Fey::DBIManager::Source object. If no source is specified, then this method will use the default source.

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.