Re: CDBI::DATA::Schema idea
[prev]
[thread]
[next]
[Date index for 2004/05/22]
On Sat, May 22, 2004 at 03:17:02PM +0100, Simon Cozens wrote:
> Since not everyone uses the same RDBMS, and not all RDBMSes use the same SQL,
> CDBI::DATA::Schema helpfully has an undocumented "translate" option which
> rewrites the schema for a different database.
Using the equally undocumented cache option is very useful here too, as
SQL::Translator is rather slow...
But it's a very nice feature. I use it for running test-suites against a
disposable SQLite database, even though the live code runs against
MySQL.
>
> $self->set_db(Main => @params);
> my ($dbd) = $params[0] =~ /dbi:(\w+):/;
After a set_db call (although you should really be using connection()
now, btw), that will already be set in $class->__driver. Yes, it's
'private', but it should be fairly stable.
Tony
|
|
Re: CDBI::DATA::Schema idea
Tony Bowden 15:02 on 22 May 2004
|