RE: [PEAR-DEV] MDB postgres driver and MDB patch
| From: | Lukas Smith | Date: | Thu, 20 Jun 2002 10:30:48 +0000 |
| Subject: | RE: [PEAR-DEV] MDB postgres driver and MDB patch | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7229@lists.php.net to get a copy of this message | ||
Hi,
thx for the work.
I will install postgresql to check it out.
You can also run driver_test.php but you will first have to configure
driver_text_cfg.php. This will run Metabases test suite using the MDB
Metabase Wrapper. The good thing is that the tests are quite complete
and if they run through you know that a lot works :-)
If they fail it can of course be a problem in the Wrapper :-)
Oh one thing:
If you find the time could you create a manager_pgsql.php similar to
manager_mysql.php. This is a new feature that is currently being
implemented into Metabase/MDB. All of the RDBMS management methods are
being moved to a separate class and are loaded on demand.
General question:
Was the Readme.txt helpful?
If you have any further guidelines you would have liked to have seen
please mail them to me and I will include them.
A couple of things concering your patch to common.php:
Thx for spotting those places where I was still checking for true/false
return values. I fear there are still a couple places where this is the
case but we are getting closer to elimination :-)
Regarding the while loops in fetchCol and fetchAll I would much rather
leave it like it is ATM. This way we can do without seeking the row with
every fetchInto call. Why exactly did you feel it was necessary to add
$row?
I assume you did this because of baseFetchInto?
I have added the following to the method:
function baseFetchInto($result, &$array, $rownum)
{
if($rownum == NULL) {
++$this->highest_fetched_row[$result];
$rownum = $this->highest_fetched_row[$result];
} else {
$this->highest_fetched_row[$result] =
max($this->highest_fetched_row[$result], $row);
}
and this to the mysql specific fetchInto:
function fetchInto($result, &$array, $fetchmode = DB_FETCHMODE_DEFAULT,
$row = NULL)
{
if ($row !== NULL) {
if (!@mysql_data_seek($result, $row)) {
return NULL;
}
$this->highest_fetched_row[$result] =
max($this->highest_fetched_row[$result], $row);
} else {
++$this->highest_fetched_row[$result];
}
Anyways I am preparing a release today.
If all goes well your pgsql driver should be in the next release.
Best regards,
Lukas Smith
smith@dybnet.de
_______________________________
DybNet Internet Solutions GbR
Reuchlinstr. 10-11
Gebäude 4 1.OG Raum 6 (4.1.6)
10553 Berlin
Germany
Tel. : +49 30 83 22 50 00
Fax : +49 30 83 22 50 07
www.dybnet.de info@dybnet.de
> -----Original Message-----
> From: Paul Cooper [mailto:pgc@ucecom.com]
> Sent: Wednesday, June 19, 2002 5:14 PM
> To: pear-dev@lists.php.net
> Subject: [PEAR-DEV] MDB postgres driver and MDB patch
>
> I've been working on constructing a postgres driver for MDB. Following
> the instructions in the MDB readme I've ported the metabase driver,
> added methods from PEAR DB postgres driver as needed. You can get it
> from here,
>
> http://sparky.ucecom.com/~pgc/MDB/pgsql.phps
>
> I tried to go through the code and reformat to the pear cs. I haven't
> added the license. I presume we have permission to relicense metabase
> components into pear?
>
> I made some changes to common.php in the process of developing /
> debugging, see attached diff.
>
> It copes with everything in MDB_test.php (minus stuff on the todo :).
>
> TODO
>
> * sort out sequences and nextId
> * write / port a manager class
> * BLOB stuff - never really used BLOBs so this will be last
> * more PHPDoc and docs in general
> * more robust testing framework
>
> Paul
>
> --
> -----------------------------------------------------------------
> Paul Cooper | Tel: 0121 331 7858
> Senior Programmer and Database Engineer | Fax: 0121 331 7859
> UCEcom |
> mailto:pgc@ucecom.com
> University of Central England |
> http://www.ucecom.com
> Birmingham, B4 7DX |
> -----------------------------------------------------------------