Marcus Ramberg > DBIx-Class-0.05999_04 > DBIx::Class

Download:
DBIx-Class-0.05999_04.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  15
Open  16
Stalled  12
View/Report Bugs
Module Version: 0.05999_04   Source   Latest Release: DBIx-Class-0.08270

NAME ^

DBIx::Class - Extensible and flexible object <-> relational mapper.

SYNOPSIS ^

DESCRIPTION ^

This is an SQL to OO mapper, inspired by the Class::DBI framework, and meant to support compability with it, while restructuring the internals and making it possible to support some new features like self-joins, distinct, group bys and more.

This project is still at an early stage, so the maintainers don't make any absolute promise that full backwards-compatibility will be supported; however, if we can without compromising the improvements we're trying to make, we will, and any non-compatible changes will merit a full justification on the mailing list and a CPAN developer release for people to test against.

The community can be found via -

  Mailing list: http://lists.rawmode.org/mailman/listinfo/dbix-class/

  SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/

  Wiki: http://dbix-class.shadowcatsystems.co.uk/

  IRC: irc.perl.org#dbix-class

QUICKSTART ^

If you're using Class::DBI, and want an easy and fast way of migrating to DBIx::Class, take a look at DBIx::Class::CDBICompat.

There are two ways of using DBIx::Class, the "simple" way and the "schema" way. The "simple" way of using DBIx::Class needs less classes than the "schema" way but doesn't give you the ability to easily use different database connections.

Some examples where different database connections are useful are:

different users with different rights different databases with the same schema.

Simple

First you need to create a base class which all other classes will inherit from. See DBIx::Class::DB for information on how to do this.

Then you need to create a class for every table you want to use with DBIx::Class. See DBIx::Class::Table for information on how to do this.

Schema

With this approach, the table classes inherit directly from DBIx::Class::Core, although it might be a good idea to create a "parent" class for all table classes that inherits from DBIx::Class::Core and adds additional methods needed by all table classes, e.g. reading a config file or loading auto primary key support.

Look at DBIx::Class::Schema for information on how to do this.

If you need more help, check out the introduction in the manual below.

SEE ALSO ^

DBIx::Class::Core - DBIC Core Classes
DBIx::Class::Manual - User's manual
DBIx::Class::CDBICompat - Class::DBI Compat layer
DBIx::Class::Schema
DBIx::Class::ResultSet
DBIx::Class::ResultSource
DBIx::Class::Row - row-level methods
DBIx::Class::PK - primary key methods
DBIx::Class::Relationship - relationships between tables

AUTHOR ^

Matt S. Trout <mst@shadowcatsystems.co.uk>

CONTRIBUTORS ^

Alexander Hartmaier <alex_hartmaier@hotmail.com>

Andy Grundman <andy@hybridized.org>

Andres Kievsky

Brandon Black

Brian Cassidy <bricas@cpan.org>

Christopher H. Laco

CL Kao

Daisuke Murase <typester@cpan.org>

Dan Kubb <dan.kubb-cpan@onautopilot.com>

Dan Sully <daniel@cpan.org>

Daniel Westermann-Clark <danieltwc@cpan.org>

David Kamholz <dkamholz@cpan.org>

Jesper Krogh

Jess Robinson

Jules Bean

Justin Guenther <guentherj@agr.gc.ca>

Marcus Ramberg <mramberg@cpan.org>

Nigel Metheringham <nigelm@cpan.org>

Paul Makepeace

Robert Sedlacek <phaylon@dunkelheit.at>

sc_ of irc.perl.org#dbix-class

Scott McWhirter (konobi)

Scotty Allen <scotty@scottyallen.com>

Todd Lipcon

Will Hawes

LICENSE ^

You may distribute this code under the same terms as Perl itself.

syntax highlighting: