[Dbix-class] Auto-joins

Matt S Trout dbix-class at trout.me.uk
Thu Mar 30 19:06:58 CEST 2006


Nilson Santos Figueiredo Junior wrote:
> On 3/30/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
>>>> SQL::Abstract is not modular enough... Please join me on irc at
>>>> around 18:00 GMT as I'm suffering from this too and want to fix it
>>>> =)
>> Right. I made this sort-of work in Sweet, but it was a nasty, fragile hack
>> (including the fine joy of regexing the generated SQL afterwards because it
>> didn't provide me anywhere at all to hook the key part of IS NULL clauses).
>> I've politely refused to visit anything that horrific on the DBIC internals,
>> on the grounds that a little extra typing is a lot better than flaky automagic.
> 
> Ok, I admittedly haven't looked at the internals so this could be
> completely non-sense but shouldn't SQL::Abstract be responsible only
> for generating the actual SQL? DBIx::Class should do the auto-joining
> and pass SQL::Abstract the appropriate parameters. I really can't
> understand why such hacks were needed. Maybe I'll have to read some
> code to understand it.

Yes, that would be what we'd intend to do. But for the purposes of that we 
need a full SQL::Abstract abstract query tree parser with useful callbacks. 
Guess where the only such parser is. Now note my comments above about its 
complete lack of usefull callbacks :)

-- 
      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