1 package DBIx::Class::Schema::Loader::Writing;
9 DBIx::Class::Schema::Loader::Writing - Loader subclass writing guide
13 package DBIx::Class::Schema::Loader::Foo;
15 # THIS IS JUST A TEMPLATE TO GET YOU STARTED.
18 use base 'DBIx::Class::Schema::Loader::Generic';
21 sub _loader_db_classes {
22 return qw/DBIx::Class::PK::Auto::Foo/;
23 # You may want to return more, or less, than this.
28 my $dbh = $class->storage->dbh;
29 return $dbh->tables; # Your DBD may need something different
32 sub _loader_table_info {
33 my ( $class, $table ) = @_;
35 return ( \@cols, \@primary );
38 sub _loader_relationships {
41 $class->_loader_make_relations($table, $f_key, $f_table, $f_column);
42 # For each relationship you want to set up ($f_column is
43 # optional, default is $f_table's primary key)