RE: [PEAR-CVS] cvs: pear /DB/DB dbase.php fbsql.php ibase.php ifx.php msql.php mssql.php mysql.php mysql4.php oci8.php odbc.php pgsql.php sqlite.php
sybase.php

From: Date: Sat, 03 Jan 2004 06:21:49 +0000
Subject: RE: [PEAR-CVS] cvs: pear /DB/DB dbase.php fbsql.php ibase.php ifx.php msql.php mssql.php mysql.php mysql4.php oci8.php odbc.php pgsql.php sqlite.php
sybase.php
References: 1  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-328@lists.php.net to get a copy of this message
> From: Alan Knowles [mailto:alan@akbkhome.com] > Sent: Saturday, January 03, 2004 6:26 AM > Daniel Convissor wrote: > > Hi Lukas, et al: > > > > On Sat, Jan 03, 2004 at 01:58:20AM +0100, Lukas Smith wrote: > I had a look through the thread on PEAR:DB & oracle. > > the problem with absolute portability is that you end up with the worst > crap from all databases :) > > In reality, portability is most likely to mean working on 3-4 (at most) > out of the 8 supported databases. True, the only problem is known which ones the user will want. > If you need to support oracle then using lc keys looks like the only > option. - but otherwise it is a bit of a annoyance to other drivers if > you never use oracle, but need other features of portability.. > > If it was being done fresh today.. the best solution would be > $option['portability'] = > DB_PORTABILITY_LOWERCASE + //1 > DB_PORTABILITY_DELETE_FIX + //2 > DB_PORTABILITY_NUMROWS + //4 > > this could be added as a condition in setOption: > if ($option== 'optimize') { > $this->options['portability'] = ($value='portability') ? 7 : 0; > } I have been pondering the exact same thing. We may end up with a lot of different options that way but it really seems like the cleanest way to approach this. I think I will even do this in MDB2. > I would suggest > a) making portibility a depreciated option > b) modify the tableInfo returns to do the lowercasing as well. Uhm you could do this change now. You can have a BC hack which checks if the option is set to a Boolean in which case the current behaviour is set per driver. In case the setting is numeric you use the new system. > > The point of quote() is to make a variable safe for insertion into a > > query. > > Not acording to the docs "DB_Common::quote() -- quotes a string" And when in doubt the docs should bet he guideing light I would say. > Options > a) Leave as was: > + No BC issues > - broken in both ways (neither a magic quoting, or pure quoting) > b) Fix magic & add method simpleQuote > + at least behaviour is consistant. > + reasonably BC > - method name / documentation not perfect.. > c) Massive rename > - breaks BC badly... > + makes naming far more sensible. > > b) looks like the best option here. Fine with me. All in all if we dont move to a new major version (which doesnt make sense unless we truly start to mess with the code in a lot of ways) we have to accept the fact that this is one of the most used PHP packages and that fixing things will often mean adding BC hacks. Yes this may make things needlessly complex, or even somewhat slower. But this is the only way to maintain the consistency we have to provide for the users. Regards, Lukas

« previous php.pear.qa (#328) next »