[Dbix-class] Overriding limit_dialect

Matt S Trout dbix-class at trout.me.uk
Wed Jan 25 17:48:28 CET 2006


On Wed, Jan 25, 2006 at 03:38:49PM +0100, Jesper Krogh wrote:
> hi.
> 
> I've tried to use DBIx::Class against a DBD::JDBC database (MS SQL Server)
> and it generally works fine, except that the call to SQL::Abstract::Limit
> cannot deduce the limit dialect on the remote server.
> 
> This patch allows to explicit specify the limit dialect in the main
> connection:
> 
> __PACKAGE__->connection("dbi:JDBC:hostname=$hostname;port=$port;url=$url",$user,$password,{"limit_dialect"
> => "postgresql"});

Erm. I think there's a way to get the db you're connected to out of a JDBC
or ODBC handle, but I forget exactly what it is. A patch to do that would be
wonderful (hint :).

I don't however see the advantage to your patch over

__PACKAGE__->connection(...);
__PACKAGE__->storage->sql_maker->limit_dialect('postgresql');

-- 
     Matt S Trout       Offering custom development, consultancy and support
  Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list