Take me over?
NAME
Fey::Loader::DBI - Base class (and fallback) for loading a schema
VERSION
version 0.13
SYNOPSIS
my $loader = Fey::Loader->new( dbh => $dbh );
my $schema = $loader->make_schema( name => $name );
DESCRIPTION
Fey::Loader::DBI
will create a schema by using the various DBI info methods. It is a complete implementation of a loader, but it only works if the driver in question fully supports the info methods needed, which many don't. In addition, some information simply isn't available via those methods, like whether a column is auto-incremented.
For that reason, you probably won't get good results for your schema unless there is a driver-specific loader subclass for your DBMS.
METHODS
This class provides the following methods:
Fey::Loader::DBI->new( dbh => $dbh )
Given a database handle, returns a new Fey::Loader::DBI
object. You probably want to call Fey::Loader-
new()> instead, though.
To change the classes used to build up the schema and its related objects, you may provide schema_class
, table_class
, column_class
, and fk_class
parameters; they default to Fey::Schema
, Fey::Table
, Fey::Column
, and Fey::FK
respectively.
$loader->make_schema( name => $name )
This method returns a new, fully-populated Fey::Schema
object. The name parameter is optional, and if given will be used as the name of the new schema. Otherwise the name will be found through the DBI
handle.
BUGS
Please report any bugs or feature requests to bug-fey-loader@rt.cpan.org
, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2011 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)