-
-
12 Jul 2015 18:37:58 UTC
- Distribution: Fey-ORM
- Module version: 0.47
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (1)
- Testers (703 / 0 / 0)
- Kwalitee
Bus factor: 1- 62.39% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (78.67KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Class::Load
- Class::MOP::Method::Generated
- Devel::GlobalDestruction
- Exception::Class
- Fey
- Fey::DBIManager
- Fey::Exceptions
- Fey::Literal::Function
- Fey::Placeholder
- Fey::SQL
- Fey::Table
- List::AllUtils
- List::Util
- Moose
- Moose::Exporter
- Moose::Meta::Attribute
- Moose::Meta::Class
- Moose::Meta::Method
- Moose::Meta::Method::Constructor
- Moose::Role
- Moose::Util::MetaRole
- Moose::Util::TypeConstraints
- MooseX::ClassAttribute
- MooseX::Params::Validate
- MooseX::SemiAffordanceAccessor
- MooseX::StrictConstructor
- MooseX::Types
- MooseX::Types::Combine
- MooseX::Types::Moose
- Object::ID
- Scalar::Util
- Sub::Exporter
- Try::Tiny
- base
- namespace::autoclean
- strict
- warnings
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Take me over?
The maintainer of this distribution is looking for someone to take over! If you're interested then please contact them via email.- NAME
- VERSION
- SYNOPSIS
- DESCRIPTION
- EARLY VERSION WARNING
- GETTING STARTED
- BUGS
- AUTHOR
- COPYRIGHT AND LICENSE
NAME
Fey::ORM - A Fey-based ORM (If you like SQL, you might like Fey::ORM)
VERSION
version 0.47
SYNOPSIS
A "table-based" class for the User table:
package MyApp::Model::User; use MyApp::Model::Schema; use Fey::ORM::Table; my $schema = MyApp::Model::Schema->Schema(); has_table $schema->table('User'); has_one $schema->table('Group'); has_many 'messages' => ( table => $schema->table('Messages') );
MyApp::Model::Schema
might look like this:package MyApp::Model::Schema; use Fey::DBIManager::Source; use Fey::Loader; use Fey::ORM::Schema; my $source = Fey::DBIManager::Source->new( dsn => 'dbi:Pg:dbname=MyApp', user => 'myapp', ); my $schema = Fey::Loader->new( dbh => $source->dbh() )->make_schema(); has_schema $schema;
__PACKAGE__->DBIManager()->add_source($source);
Then in your application:
use MyApp::Model::User; my $user = MyApp::Model::User->new( user_id => 1 ); print $user->username(); $user->update( username => 'bob' );
DESCRIPTION
Fey::ORM builds on top of other Fey project libraries to create an ORM focused on easy SQL generation. This is an ORM for people who are comfortable with SQL and want to be able to use it with their objects, rather than people who like OO and don't want to think about the DBMS.
Fey::ORM also draws inspiration from
Moose
and tries to provide as much functionality as it can via a simple declarative interface. Of course, it usesMoose
under the hood for its implementation.EARLY VERSION WARNING
This is still very new software, and APIs may change in future releases without notice. You have been warned.
Moreover, this software is still missing a number of features which will be needed to make it more easily usable and competitive with other ORM packages.
GETTING STARTED
You should start by reading Fey::ORM::Manual::Intro. This will walk you through creating a set of classes based on a schema. Then look at Fey::ORM::Manual for a list of additional documentation.
BUGS
Please report any bugs or feature requests to
bug-fey-orm@rt.cpan.org
, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT AND LICENSE
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.
Module Install Instructions
To install Fey::ORM, copy and paste the appropriate command in to your terminal.
cpanm Fey::ORM
perl -MCPAN -e shell install Fey::ORM
For more information on module installation, please visit the detailed CPAN module installation guide.