Re: SQL_Wrapper Class
| From: | Martin Jansen | Date: | Wed, 10 Jul 2002 07:31:47 +0000 |
| Subject: | Re: SQL_Wrapper Class | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7613@lists.php.net to get a copy of this message | ||
On Wed, 10 Jul 2002 09:28:05 +0200, l.woods@swissart.net wrote:
>I am new to this list and new to the PHP/PEAR community. I am writing
>an SQL wrapper class which will use the DB class from PEAR for the
>Database connection. The class will provide methods for the most
>common database interactions; i.e. $sqlObj->insert(array()); where the
>keys of the array are the fieldnames and the values of the array are
>rowvalues.
Sounds like a bit of userland overhead, no? :)
>Question: Is there already a similar class in PEAR which I can use.
The DB package already comes with DB/Storage.php which implements
something similar for manipulating databases. But no, something like
you are developing is not part of PEAR right now.
>If
>not: would it make sense that I write my class in PEAR standards and
>submit it to the community?
I don't think that I would use it, since IMO this may add even more
overhead than PEAR DB already adds, since database functions are
wrapped twice in your model (native DBMS -> PEAR::DB -> your package).
But I can think of a lot of people that would be happy to have
something like this => no problem with submitting it so far.
- Martin