in reply to Re^2: Migrating to DBIx::Class
in thread Migrating to DBIx::Class
Having a complete arbitrary SQL clause would defeat the whole idea of DBIx::Class : you will loose the whole OO-part of it. DBIx::Class needs to know how your SQL is constructed to perform its OO-magic (triggers, inflating and deflating fields, joins, accessors, ...). That is why the "arbitrary SQL" from DBIX::Class has to go through the trick of using it as a sub-select in a custom ResultSource.
If you really need to use raw arbitrary SQL, DBIx::Class::Storage::DBI->dbh provides access to the DBI database handle, but I never yet found any reason to use this.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Migrating to DBIx::Class
by DBX (Pilgrim) on Mar 24, 2008 at 22:13 UTC | |
by CountZero (Bishop) on Mar 24, 2008 at 23:12 UTC | |
by Your Mother (Archbishop) on Jan 28, 2009 at 17:12 UTC |