[Bast-commits] r5505 - DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual

castaway at dev.catalyst.perl.org castaway at dev.catalyst.perl.org
Tue Feb 17 21:22:05 GMT 2009


Author: castaway
Date: 2009-02-17 21:22:05 +0000 (Tue, 17 Feb 2009)
New Revision: 5505

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/FAQ.pod
Log:
Add multiple database/schema FAQs


Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/FAQ.pod
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/FAQ.pod	2009-02-17 21:08:05 UTC (rev 5504)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/FAQ.pod	2009-02-17 21:22:05 UTC (rev 5505)
@@ -68,7 +68,25 @@
 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<DBIx::Class::ResultSource/table> call. Eg:
+
+  __PACKAGE__->table('mydb.mytablename');
+
+And load all the Result classes for both / all databases using one
+L<DBIx::Class::Schema/load_namespaces> call.
+
+=item .. use DBIx::Class across PostgreSQL/DB2/Oracle schemas?
+
+Add the name of the schema to the L<DBIx::Class::ResultSource/table>
+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 
 
 =head2 Relationships




More information about the Bast-commits mailing list