On 3/30/06, Matt S Trout <[EMAIL PROTECTED]> wrote:
> quick example for you from the S::A tests
>
> [-maybe => {race => [-and => [qw(black white asian)]]},
>    {-nest => {firsttime => [-or => {'=','yes'}, undef]}},
>    [ -and => {firstname => {-not_like => 'candace'}},
>              {lastname => {-in => [qw(jugs canyon towers)]}} ] ] ]
>
> making it work for trivial queries is trivial. making it work for every
> possible query is more complex :)

Yes. But I think it's better to be able to auto-join simple queries
than to not do it at all.

Actually, I'd never write queries like this example.
Anything that gets a little more complex will, usually, be much more
readable as plain SQL. I mean, the end of this query looks like Lisp
on steroids (i.e. with brackets and curly braces besides parens). It's
damn ugly.

I know this might be seen with some criticism, but I'd rather maintain
SQL statements than that complex data structures mess and I know this
query is actually not that complex.

Anyway... why not patching SQL::Abstract? Or is it somehow unpatchable
(i.e. so badly messed up that you wouldn't touch it with a 10 foot
pole)?

-Nilson Santos F. Jr.

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/

Reply via email to