1 package DBIx::Class::Schema::Loader::Writing;
10 DBIx::Class::Schema::Loader::Writing - Loader subclass writing guide
14 package DBIx::Class::Schema::Loader::Foo;
16 # THIS IS JUST A TEMPLATE TO GET YOU STARTED.
20 use base 'DBIx::Class::Schema::Loader::Generic';
24 return qw/PK::Auto::Foo/;
25 # You may want to return more, or less, than this.
30 my $dbh = $self->schema->storage->dbh;
31 return $dbh->tables; # Your DBD may need something different
35 my ( $self, $table ) = @_;
37 return ( \@cols, \@primary );
40 sub _load_relationships {
44 # make a simple relationship, where $table($column)
45 # references the PK of $f_table:
46 $self->_make_simple_rel($table, $f_table, $column);
48 # make a relationship with a complex condition-clause:
49 $self->_make_cond_rel($table, $f_table,
50 { foo => bar, baz => xaa } );