Re: Fwd: [PEAR] Some tweaks to DB_DataObject
| From: | Alan Knowles | Date: | Fri, 22 Apr 2005 08:11:36 +0000 |
| Subject: | Re: Fwd: [PEAR] Some tweaks to DB_DataObject | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-37332@lists.php.net to get a copy of this message | ||
It's a good idea to
a) update your codebase with the one from CVS, there have been bugs
fixed that your diff would removed.
b) try and make one change at a time, and make a diff for it.
>From the patch
- extra variable searchLogic : this seems rather dangerous, If you need
to do something like this, then wrapping Dataobjects and adding a method
whereOr(...) would be better.(also remember by adding setLogic(), you
just broke setFrom with columns called Logic..)
- not sure why you would want explicit rollback etc. it makes a fat API
even fatter..
- please remember that this variable will not normally be set, so using
it without empty/isset will raise a warning.
$_DB_DATAOBJECT['CONFIG']['db_driver']
- I'm not sure about the extra arg on setFrom, It's looks like something
that is rarely needed, and could easily be done using a wrapper.
Regards
Alan
On Fri, 2005-04-22 at 07:21 +1000, Dan Rossi wrote:
> Hi there, I have been advised by Luke to send to this list. I however
> need advise on what to do with my changes / feature requests. Thanks to
> Alan I now know how to diff from the current cvs. Let me know thanks.
>
> Begin forwarded message:
>
> > From: Dan Rossi <pear@electroteque.org>
> > Date: 22 April 2005 12:09:18 AM
> > To: PEAR general list <pear-general@lists.php.net>
> > Subject: [PEAR] Some tweaks to DB_DataObject
> >
> > As meantioned earlier today, you can tell me I have gone too far and
> > its a BC break, but if its useful then great :)
> >
> > http://www.electroteque.org/pear/DB_DataObject.diff
> >
> > I added some methods to handle transactions begin, commit , rollback
> > and removed it from _query , but u can put that bak if u like heheh. I
> > added a feature for a condition setter method so i could add custom
> > whereAdd's, this happens during the _build_condition method. I also
> > added a feature for setFrom to ignore empty values in a key, this was
> > highly useful especailly for a search filter where I setup an advanced
> > search form, but i dont want all fields to show up in the query only
> > the ones i selected ! It was having unexpected results.
> >
> > I noticed some changes were made via cvs, how do i do an update on my
> > end hehe.
> >
> > --
> > PEAR General Mailing List (http://pear.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >