multi db_schema support
authorRafael Kitover <rkitover@cpan.org>
Mon, 30 May 2011 20:01:46 +0000 (16:01 -0400)
committerRafael Kitover <rkitover@cpan.org>
Tue, 16 Aug 2011 21:30:50 +0000 (17:30 -0400)
commitc4a69b87bd3d3fdda08f05d363311a6e9d3fc0f7
tree9a53e525b2f86747d418c79a5ad1b6a9978fef24
parenta47e6e743dfce14a61c2f2c4d5214d88c1c35b36
multi db_schema support

Allows putting multiple schemas or databases and schemas into the
db_schema option. Supports cross-schema foreign keys where available. On
Sybase ASE, MSSQL and Informix multiple databases as well as schemas are
supported (but only Sybase ASE allows cross-database foreign keys.)

Adds the moniker_parts option for resolving name clashes when using
multiple schemas that have tables with the same name.

Table names are now represented by the ::Table class (all the code for
which is in the ::DBObject superclass.) There is also ::Table::Sybase
for Sybase ASE and MSSQL as well as ::Table::Informix for Informix. In
the future other database objects such as sequences may use the
::DBObject class.

Currently there are extra tests for objects in separate schemas and
cross-schema relationships for each database separately, these may later
be merged into the common tests in some fashion.

All database backends are up to date with respect to their capabilities
for fully qualified table names, with some exceptions.

 - no support for dblinks in Oracle
 - no support for serverlinks in MSSQL
 - no support for databases attached as namespaces in SQLite

For SQLite, Firebird and MS Access it is possible to pass a single
db_schema and have DBIC names qualified with it, but this capability is
primarily for testing and deployment.
50 files changed:
Changes
TODO
lib/DBIx/Class/Schema/Loader.pm
lib/DBIx/Class/Schema/Loader/Base.pm
lib/DBIx/Class/Schema/Loader/DBI.pm
lib/DBIx/Class/Schema/Loader/DBI/ADO.pm
lib/DBIx/Class/Schema/Loader/DBI/ADO/MS_Jet.pm
lib/DBIx/Class/Schema/Loader/DBI/ADO/Microsoft_SQL_Server.pm
lib/DBIx/Class/Schema/Loader/DBI/DB2.pm
lib/DBIx/Class/Schema/Loader/DBI/Informix.pm
lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm
lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm
lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm
lib/DBIx/Class/Schema/Loader/DBI/ODBC/ACCESS.pm
lib/DBIx/Class/Schema/Loader/DBI/ODBC/Firebird.pm
lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm
lib/DBIx/Class/Schema/Loader/DBI/ODBC/SQL_Anywhere.pm
lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm
lib/DBIx/Class/Schema/Loader/DBI/Pg.pm
lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm
lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm
lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm
lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm
lib/DBIx/Class/Schema/Loader/DBI/Sybase/Microsoft_SQL_Server.pm
lib/DBIx/Class/Schema/Loader/DBI/Writing.pm
lib/DBIx/Class/Schema/Loader/DBI/mysql.pm
lib/DBIx/Class/Schema/Loader/DBObject.pm [new file with mode: 0644]
lib/DBIx/Class/Schema/Loader/DBObject/Informix.pm [new file with mode: 0644]
lib/DBIx/Class/Schema/Loader/DBObject/Sybase.pm [new file with mode: 0644]
lib/DBIx/Class/Schema/Loader/RelBuilder.pm
lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm
lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm
lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_06.pm
lib/DBIx/Class/Schema/Loader/Table.pm [new file with mode: 0644]
lib/DBIx/Class/Schema/Loader/Table/Informix.pm [new file with mode: 0644]
lib/DBIx/Class/Schema/Loader/Table/Sybase.pm [new file with mode: 0644]
script/dbicdump
t/10_02mysql_common.t
t/10_03pg_common.t
t/10_04db2_common.t
t/10_05ora_common.t
t/10_06sybase_common.t
t/10_07mssql_common.t
t/10_08sqlanywhere_common.t
t/10_09firebird_common.t
t/10_10informix_common.t
t/23dumpmore.t
t/24loader_subclass.t
t/25backcompat.t
t/lib/dbixcsl_common_tests.pm