[Dbix-class] Data partitioning and DBIC

Oleg Pronin syber.rus at gmail.com
Wed Apr 4 14:09:34 GMT 2007


I thought of 'database' as of 'physical database', i.e. database server. Two
different databases on the same server is one 'physical database'. So i
meant there was no way to do that in case of two different physical
databases.

2007/4/4, Ash Berlin <ash_cpan at firemirror.com>:
>
> Oleg Pronin wrote:
> > As far as i know there is not.
> > There is no way to execute select with joining two tables in different
> > databases so the relationships are useless.
> >
> >
>
> That depends entierly on your definition of database. If you are talking
> about the MySQL definition of database, then yes you can by changing the
> table from
>
> ->table('foo')
>
> to
>
> ->table('db.foo')
>
> So long as they are on the same host and the same user can access both.
>
> If you want to do this at some arbitrary point in time, I thinjk you
> have to do something like the following:
>
> $schema->source('Foo')->table('db.foo')
>
> Completely untested mind.
>
> HTH
>
> -ash
>
> _______________________________________________
> List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> Searchable Archive:
> http://www.mail-archive.com/dbix-class@lists.rawmode.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070404/4af=
f0d0a/attachment.htm


More information about the Dbix-class mailing list