[Dbix-class] select * from questions
Matt S Trout
dbix-class at trout.me.uk
Thu Apr 27 17:49:09 CEST 2006
Aran Deltac wrote:
> On 4/27/2006, "Gavin Carr" <gavin at openfusion.com.au> wrote:
>> 3. For situations where you have queries that aren't supported by DBIC yet,
>> is there a way to source the underlying Schema dbh for doing statement
>> handles directly, or this not kosher? There's nothing obvious in
>> DBIx::Class::Schema or DBIx::Class::Storage::DBI.
>
> Thats not kosher, since DBIC _should_ handle all situations (although
> there are admitedly a few things it can't do, for now). So, in those
> rare cases, you can get at it with you storage object. Such as
> $obj->result_source->storage->dbh();
But come bitch on here first, there's almost always a better way than grabbing
the dbh yourself - even if you have to use some literal SQL chunks you'll get
more help from DBIC if you let it still control at least part of the query :)
--
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