From: Marcus Ramberg Date: Fri, 14 Oct 2005 15:35:52 +0000 (+0000) Subject: merged in hartmeier quickstart X-Git-Tag: v0.05005~198 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=448c84249a180a500380fb47b0a4bb6e12f1fa16;p=dbsrgits%2FDBIx-Class.git merged in hartmeier quickstart updated attributes. --- diff --git a/lib/DBIx/Class.pm b/lib/DBIx/Class.pm index 9bee70f..c143635 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -41,32 +41,43 @@ The community can be found via - =head1 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 look at L. - use base qw/Class::DBI/; +There are two ways of using DBIx::Class, the 'simple' and the 'schema' one. -with +The 'simple' way of using DBIx::Class needs less classes than the 'schema' +way but doesn't give you the ability to use different database connections. - use base qw/DBIx::Class/; - __PACKAGE__->load_components(qw/CDBICompat Core DB/); +Some examples where different database connections are useful are: -will probably get you started. +different users with different rights +different databases with the same schema. -If you're using AUTO_INCREMENT for your primary columns, you'll also want -yo load the approriate PK::Auto subclass - e.g. +=head1 Simple - __PACKAGE__->load_components(qw/CDBICompat PK::Auto::SQLite Core DB/); +First you need to create a base class all other classes inherit from. -(with is what ::Test::SQLite does to present the Class::DBI::Test::SQLite -interface) +Look at L 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, +Next you need to create a class for every table you want to use with +DBIx::Class. - use base qw/DBIx::Class/; - __PACKAGE__->load_components(qw/Core DB/); +Look at L how to do this. -and have a look at t/lib/DBICTest.pm for a brief example. + +=head2 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 which inherits from DBIx::Class::Core and adds additional methods +needed by all table classes, e.g. reading a config file, loading auto primary +key support. + +Look at L how to do this. + +If you need more hand-holding, check out the introduction in the +manual below. =head1 SEE ALSO @@ -74,7 +85,7 @@ and have a look at t/lib/DBICTest.pm for a brief example. =item L - DBIC Core Classes -=item L Compat layer. +=item L - L Compat layer. =item L - User's manual. diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 6178af7..3cc8caa 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -300,11 +300,6 @@ For paged resultsset, how many rows per page For paged resultsset, which page to start on. -=item accesor - -Tells the recordset how to prefetch relations. Can either be 'single' or -'filter'. - =back 1;