Re: new package DB_Abstract/Easy/DataBuilder/DataGette r/?
| From: | Wolfram Kriesing | Date: | Wed, 15 Jan 2003 23:09:41 +0000 |
| Subject: | Re: new package DB_Abstract/Easy/DataBuilder/DataGette r/? | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-12518@lists.php.net to get a copy of this message | ||
Alan Knowles wrote:
ok DB_QueryTool seems a good compromise i will go for it tomorrow, of course unless major objections come along :-) since the word 'query' is not only a SQL-statment but does also have the meaning of querying i think its okI would go with QueryBuilder or QueryTool, at basically all the stuff you describe below is really enhancing the query building (by validating etc.)..DB_QueryBuilder or something along those lines (except i miss the point of what your package does :))) Or the DataBuilder you proposed.
I know it may be a pain... but it might be worth considering following some of the existing method names in dataobjects.. ->orderBy(), rather than setOrder().. etc. that way you can just copy and paste the docs from dataobjects.. some of the time...i understand the concern. i would consider a wrapper or alike. in the beginning the methods were also called orderBy and joinAdd but later we switched it. i chose [set|get|add][Select|Group|Join|Leftjoin|Where|Order] for the following reason - set* always means you set the value for * an empty value resets the value - add* always adds a new value, like addWhere('x=7') does getWhere().' AND x=7' so the value is not overwritten just extended - get* lets me get the current value this way i can easily add new methods and the naming scheme stays the same and once you see a method's prefix you know what it does. might just be a personal preference :-) -- Wolfram ... translating template system ... http://sourceforge.net/projects/simpletpl now also as PEAR-package available ... authentication system .... http://sf.net/projects/auth ... and more at .... http://opensource.visionp.de