MDB2 wrapper update

Lukas Kahwe Smith smith at pooteeweet.org
Thu May 18 09:33:17 CEST 2006


Hi,

I updated the MDB2 wrapper ..
It also seems to work with the session class, so the mdb2 specific
handling can be disabled in main.inc.

There is one problem with the affectedRows() method.

MDB2 (as well as the new PDO extension) require the use of the exec()
method for DML (INSERT/UPDATE/DELETE..) and then it directly returns the
affected rows number.

To accommodate this the wrapper would need to be expanded. Either 
query() needs to get another parameter or even better there needs to be 
an exec() method in the wrapper that behaves like MDB2/PDO. Its easy to 
get the same behavior with DB.

I also attached an xml schema file. This file can use used with 
MDB2_Schema (or ezc/DatabaseSchema) as a single portable RDBMS schema 
file from which both mentioned packages can even generate alter 
statements. So instead of having to maintain multiple files per RDBMS 
and one installation/upgrading file for each you fold everything into a 
single file.

Do note however that currently there is no way to handle UPDATE/DELETE 
statements, and there is no support for FOREIGN KEY's at this point. If 
there is interest I can help in writing an installer for this. The file 
can also be used at packaging time to generate the SQL files you guys 
currently ship (http://pooteeweet.org/blog/312).

regards,
Lukas

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rcube_mdb2.inc
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20060518/ddb50f8b/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: roundcube.schema.xml
Type: text/xml
Size: 10319 bytes
Desc: not available
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20060518/ddb50f8b/attachment.xml>


More information about the Dev mailing list