DBIx::Class::Schema::Loader

Dynamic definition of a DBIx::Class::Schema
Download

DBIx::Class::Schema::Loader Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dagfinn Ilmari Manns?ker
  • Publisher web site:
  • http://search.cpan.org/~ilmari/

DBIx::Class::Schema::Loader Tags


DBIx::Class::Schema::Loader Description

Dynamic definition of a DBIx::Class::Schema DBIx::Class::Schema::Loader is a Perl module that automates the definition of a DBIx::Class::Schema by scanning database table definitions and setting up the columns, primary keys, and relationships.DBIx::Class::Schema::Loader currently supports only the DBI storage type. It has explicit support for DBD::Pg, DBD::mysql, DBD::DB2, DBD::SQLite, and DBD::Oracle. Other DBI drivers may function to a greater or lesser degree with this loader, depending on how much of the DBI spec they implement, and how standard their implementation is.Patches to make other DBDs work correctly welcome.See DBIx::Class::Schema::Loader::DBI::Writing for notes on writing your own vendor-specific subclass for an unsupported DBD driver.This module requires DBIx::Class 0.07006 or later, and obsoletes the older DBIx::Class::Loader.This module is designed more to get you up and running quickly against an existing database, or to be effective for simple situations, rather than to be what you use in the long term for a complex database/project.That being said, transitioning your code from a Schema generated by this module to one that doesn't use this module should be straightforward and painless, so don't shy away from it just for fears of the transition down the road.SYNOPSIS package My::Schema; use base qw/DBIx::Class::Schema::Loader/; __PACKAGE__->loader_options( constraint => '^foo.*', # debug => 1, ); # in seperate application code ... use My::Schema; my $schema1 = My::Schema->connect( $dsn, $user, $password, $attrs); # -or- my $schema1 = "My::Schema"; $schema1->connection(as above); Requirements: · Perl


DBIx::Class::Schema::Loader Related Software