X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FManual%2FIntro.pod;h=b39c0e3e908a359d5e9b3aef0f103c35c2dbceb3;hb=eb3bb737db34965596d2875f9b21bb4912a35160;hp=18347d875fb932817080e3b1860602fd93aec265;hpb=21e5943602ce2cddef59eb882ace362d19889ee7;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Manual/Intro.pod b/lib/DBIx/Class/Manual/Intro.pod index 18347d8..b39c0e3 100644 --- a/lib/DBIx/Class/Manual/Intro.pod +++ b/lib/DBIx/Class/Manual/Intro.pod @@ -194,21 +194,31 @@ available relationships and how you can design your own. =head2 Using L This is an external module, and not part of the L distribution. -Like L, it inspects your database, and automatically creates -classes for all the tables in your database. Here's a simple setup: +It inspects your database, and automatically creates classes for all the tables +in your database. - package My::Schema; - use base qw/DBIx::Class::Schema::Loader/; +The simplest way to use it is via the L script from the +L distribution. For example: + + $ dbicdump -o dump_directory=./lib MyApp::Schema dbi:mysql:mydb user pass + +If you have a mixed-case database, use the C option, e.g.: + + $ dbicdump -o dump_directory=./lib -o preserve_case=1 MyApp::Schema \ + dbi:mysql:mydb user pass - __PACKAGE__->loader_options( relationships => 1 ); +If you are using L, then you can use the helper that comes with +L: - 1; + $ script/myapp_create.pl model MyDB DBIC::Schema MyDB::Schema \ + create=static moniker_map='{ foo => "FOO" }' dbi:SQLite:./myapp.db \ + on_connect_do='PRAGMA foreign_keys=ON' quote_char='"' -The actual autoloading process will occur when you create a connected instance -of your schema below. +See L for more information on this +helper. -See the L documentation for more information on its -many options. +See the L and L +documentation for more information on the many loader options. =head2 Connecting @@ -240,7 +250,7 @@ a special fifth argument to connect: { on_connect_do => \@on_connect_sql_statments } ); -See L for more information about +See L for more information about this and other special C-time options. =head3 Via a database handle