[Dbix-class] param_bind branch
John Napiorkowski
jjn1056 at yahoo.com
Fri Jan 19 16:19:14 GMT 2007
--- John Napiorkowski <jjn1056 at yahoo.com> wrote:
> --- 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.
Does anyone have feedback on this branch? I'm coming
into a little open time so I will be able to clean up
any troubles. Let me know what you think. Thanks!
--John
____________________________________________________________________________________
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
More information about the Dbix-class
mailing list