X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=README;h=5fc958d90e168b0d545708a88b4dfe41c8abf570;hb=d323165330a1470afdf5a9da4ff2fc270de4570e;hp=7083759e32b33ab5a8e60231712f92b1c316a12b;hpb=7e4b2f592f35284c849328d1e059d68fcbc0eb4d;p=dbsrgits%2FDBIx-Class.git diff --git a/README b/README index 7083759..5fc958d 100644 --- a/README +++ b/README @@ -3,15 +3,17 @@ NAME SYNOPSIS DESCRIPTION - This is a sql to oop mapper, inspired by the Class::DBI framework, and - meant to support compability with it, while restructuring the insides, + 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. - It's currently considered EXPERIMENTAL - bring this near a production - database at your own risk! The API is *not* fixed yet, although most of - the primitives should be good for the future and any API changes will be - posted to the mailing list before they're committed. + 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 - @@ -24,32 +26,47 @@ DESCRIPTION IRC: irc.perl.org#dbix-class QUICKSTART - If you're using Class::DBI, replacing + 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. - use base qw/Class::DBI/; + 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. - with + Some examples where different database connections are useful are: - use base qw/DBIx::Class/; - __PACKAGE__->load_components(qw/CDBICompat Core DB/); + different users with different rights different databases with the same + schema. - will probably get you started. + 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. - If you're using AUTO_INCREMENT for your primary columns, you'll also - want yo load the approriate PK::Auto subclass - e.g. + 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. - __PACKAGE__->load_components(qw/CDBICompat PK::Auto::SQLite Core DB/); + 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. - (with is what ::Test::SQLite does to present the - Class::DBI::Test::SQLite interface) + Look at DBIx::Class::Schema for information on how to do this. - If you fancy playing around with DBIx::Class from scratch, then read the - docs for DBIx::Class::Table, ::Row, ::Schema, ::DB and ::Relationship, + If you need more help, check out the introduction in the manual below. - use base qw/DBIx::Class/; - __PACKAGE__->load_components(qw/Core DB/); - - and have a look at t/lib/DBICTest.pm for a brief example. +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 @@ -63,10 +80,36 @@ CONTRIBUTORS Dan Sully - davekam + David Kamholz + + Jules Bean Marcus Ramberg + Paul Makepeace + + CL Kao + + Jess Robinson + + Marcus Ramberg + + Will Hawes + + Todd Lipcon + + Daniel Westermann-Clark + + Alexander Hartmaier + + Zbigniew Lukasiak + + Nigel Metheringham + + Jesper Krogh + + Brandon Black + LICENSE You may distribute this code under the same terms as Perl itself.