[Dbix-class] param_bind branch

John Napiorkowski jjn1056 at yahoo.com
Wed Jan 10 22:20:13 GMT 2007


--- John Napiorkowski <jjn1056 at yahoo.com> wrote:

> 
> --- Matt S Trout <dbix-class at trout.me.uk> wrote:
> 
> > I've done some fixing of this; it didn't handle
> the
> > bind attr on an rs 
> > correctly so I've tweaked that (thus making
> > CDBICompat pass)
> > 
> > John, the only failing test on there that isn't
> also
> > failing on -current 
> > is now ordered.t, can you please have a look at
> > that? Once that's 

Fixed that in the current version of the branch, turns
out I was not handling bindings for statements like: 

UPDATE employee SET position = position - 1 WHERE (
position BETWEEN ? AND ? )

properly and only that test was catching it.  I sent
out an email about my solution for this earlier today,
if anyone knows if this is good or an abuse of the
system please let me know.

> > working I -think- we're ready to push back to
> > -current, though there 
> > looks to be some code duplication in terms of
> source
> > => $source->name 
> > (which should be ->from anyway ...); I think we'd

I cleaned up a couple of places which had some cut and
paste, refactoring it to a subroutine.  However I
can't find the $source->name thing you are talking
about.  If you can give me a little more detail I will
fix it.

> be
> > better doing $ident 
> > = $ident->from if blessed($ident) && 
> > $ident->isa("DBIx::Class::ResultSource") in
> _execute
> > to a source can be 
> > passed to ->select as well, strikes me as being
> more
> > DWIMish.

I did this and seems to work.  So now
update/insert/delete all pass a $source object and
expect _execute to call ->from if necessary.  However
select still gets a string $ident; I can't figure out
how to send a $source instead.  Let me know if what I
changed is what you meant.

> 
> Yeah, there's some lazy cut and paste I should fix,
> are we cool with me making a private method for
> that? 
> Your other suggestions make sense to me.  I'll clean
> it up on Wed (USA East Coast time).  Any other
> suggestions or  glaring problems please let me know.
> 
> I have a bit of time Wed through the end of the week
> to clean up on this.

Okay, took a little longer than expected, but checked
in now :)

--john
> 
> I'll also check the failing test, probably look at
> that later tonight. Thanks for the feedback.
> 
> --john
> 
> > 
> > Brandon and other storage hackers, could you
> please
> > have a quick look at 
> > John's changes? They seem fine to me but you guys
> > know better.
> > 
> > _______________________________________________
> > 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/
> > Searchable Archive:
> >
>
http://www.mail-archive.com/dbix-class@lists.rawmode.org/
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
> _______________________________________________
> 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/
> Searchable Archive:
>
http://www.mail-archive.com/dbix-class@lists.rawmode.org/
> 



 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com



More information about the Dbix-class mailing list