From: Jess Robinson Date: Tue, 17 Feb 2009 21:22:05 +0000 (+0000) Subject: Add multiple database/schema FAQs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6342605218c1646e624a8fdaa4dbab0c1cca27f3;p=dbsrgits%2FDBIx-Class-Historic.git Add multiple database/schema FAQs --- diff --git a/lib/DBIx/Class/Manual/FAQ.pod b/lib/DBIx/Class/Manual/FAQ.pod index 9c19d31..273397a 100644 --- a/lib/DBIx/Class/Manual/FAQ.pod +++ b/lib/DBIx/Class/Manual/FAQ.pod @@ -68,6 +68,24 @@ connection does not happen until you actually request data, so don't be alarmed if the error from incorrect connection details happens a lot later. +=item .. use DBIx::Class across multiple databases? + +If your database server allows you to run querys across multiple +databases at once, then so can DBIx::Class. All you need to do is make +sure you write the database name as part of the +L call. Eg: + + __PACKAGE__->table('mydb.mytablename'); + +And load all the Result classes for both / all databases using one +L call. + +=item .. use DBIx::Class across PostgreSQL/DB2/Oracle schemas? + +Add the name of the schema to the L +as part of the name, and make sure you give the one user you are going +to connect with rights to read/write all the schemas/tables as +necessary. =back