[Dbix-class] [OT][ANNOUNCE] SQL Generation with SQL::DB
Matt S Trout
dbix-class at trout.me.uk
Wed Sep 12 17:25:20 GMT 2007
On Thu, Sep 06, 2007 at 08:07:14PM +0200, Mark Lawrence wrote:
> On Thu Sep 06, 2007 at 01:05:21PM -0400, Jason Kohles wrote:
> > On Sep 6, 2007, at 12:24 PM, Matt Rosin wrote:
> > >>>> where => $lname->like('%son%') & ! ($age < 10 | $age > 20 )
> > >
> > >Just curious, could this work too? Or do subtle precedence
> > >differences wreck it?
> > >
> > >where, ( $lname->like('%son') and not ($age < 10 or $age > 20) )
> > >
> > Changing '&' to 'and' is more than a subtle precedence difference...
> Correct. I must apologise for having used the term logic operators when
> referring to "|", "&" and "!" which are in fact all bitwise logic operators.
> Bitwise operators can be overloaded with Perl's overload.pm which is how
> SQL::DB (and Tangram, where I first saw this approach) do their magic.
> Unfortunately their big brothers (&&,||,not,and,or) cannot be overloaded.
There is a solution to this. If you'd be interested in folding the work you've
done on SQL::DB into a shared project I'll be happy to work with you on
implementing it for that :)
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
More information about the DBIx-Class