[Dbix-class] Re: Bind order bug, patch/test for review

Marc Mims marc at questright.com
Thu Oct 11 17:03:00 GMT 2007


* Matt S Trout <dbix-class at trout.me.uk> [071003 13:00]:
> > I'm not sure how to tackle this problem in a way that will satisfy all
> > the tests...yet.
> 
> Well, TODO the tests that don't pass and chuck it into 08 trunk, at least we'll
> know it's there then.

A potential solution to the bind order bug when using where/bind might
be to just eliminate the need for where/bind with a -bind operator in
SQLA.  Then:

   $rs->search({}, {
       where => { \'YEAR(date_of_hire)=?' => { -bind => 2005 }},
   });

producing:

   WHERE ( YEAR(date_of_hire)=? )

The DBIC ResultSet bind attribute would continue to work as advertised
in the complex SQL example in the Cookbook.

	-Marc



More information about the DBIx-Class mailing list