Fey::Meta::Class::Table - A metaclass for table classes
version 0.47
package MyApp::User; use Fey::ORM::Table; print __PACKAGE__->meta()->ClassForTable($table);
This is the metaclass for table classes. When you use Fey::ORM::Table in your class, it uses this class to do all the heavy lifting.
This class provides the following methods:
Given one or more Fey::Table objects, this method returns the name of the class which "has" that table, if any.
Given a class, this method returns the Fey::Table object associated with that class, if any.
Returns the Fey::Table for the metaclass's class.
Creates a new Fey::Meta::HasOne::ViaFK or Fey::Meta::HasOne::ViaSelect object and adds it to the metaclass. Internally, this will call attach_to_class() on the HasOne meta-object.
attach_to_class()
HasOne
Returns a list of the HasOne objects added to this metaclass.
Removes the named HasOne meta-object. Internally, this will call detach_from_class() on the HasOne meta-object.
detach_from_class()
Creates a new Fey::Meta::HasMany::ViaFK or Fey::Meta::HasMany::ViaSelect object and adds it to the metaclass. Internally, this will call attach_to_class() on the HasMany meta-object.
HasMany
Returns a list of the HasMany objects added to this metaclass.
Removes the named HasMany meta-object. Internally, this will call detach_from_class() on the HasMany meta-object.
Returns a boolean indicating whether or not there is an inflator defined for the named column.
Adds a new Fey::Meta::Method::FromSelect method to the class. The %options passed to this method will be passed to the Fey::Meta::Method::FromSelect constructor.
%options
This class overrides Moose::Meta::Class->make_immutable() in order to do its own optimizations for immutability.
Moose::Meta::Class->make_immutable()
Dave Rolsky <autarch@urth.org>
This software is copyright (c) 2011 - 2015 by Dave Rolsky.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Fey::ORM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Fey::ORM
CPAN shell
perl -MCPAN -e shell install Fey::ORM
For more information on module installation, please visit the detailed CPAN module installation guide.