> comparison operators, and, or and not. (Not was the hardest, because 
> SQL::Abstract doesn't directly support it, but even then it was just a 
> couple of hours).

Did you mean "Nor was it the easiest"? And how readable is your code?
It is obvious to you at first glance what the query is? I'm curious,
could you please compare the two versions of the following SQL:

    WHERE lname LIKE '%son%' AND NOT ( age < 10 OR age > 20 )

with SQL::DB:

    where => $r->lname->like('%son%') & ! ($r->age < 10 | $r->age > 20 )

with SQL::Abstract:

    %where = (
        lname => {like => '%son%'},
        age   => [-and => {'>=', 10}, {'<=', 20}],
    );

Tell me which you would find easier to write, understand, and maintain? 

For an even closer approximation it is possible to do this:

    my $age   = $r->age;
    my $lname = $r->lname;
    where => $lname->like('%son%') & ! ($age < 10 | $age > 20 )

Thanks,
Mark.
-- 
Mark Lawrence

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]

Reply via email to