RE: [PEAR-DEV] MDB 2.x

From: Date: Wed, 20 Aug 2003 08:17:11 +0000
Subject: RE: [PEAR-DEV] MDB 2.x
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20124@lists.php.net to get a copy of this message
> From: Alan Knowles [mailto:alan@akbkhome.com] > Sent: Wednesday, August 20, 2003 3:57 AM > > Just warming up to do real work.. - > comments on MDB.php > > - loadClass() uses @ silencer on include_once.. yeah I wasnt sure how to handle this. Generally I would make this dependent on the debug level. However I don't know the debug level in that method. > - apiVersion() - seems a bit waste.. > - why not just have var $apiVersion = 2 > > - isConnection = could use is_a() > > - isManip() = the string is closed at the end of the line.. ALTER will > fail.. > > - postgres driver appears to have the same ismanip bug as DB for > EXPLAIN - see bugs db.. I just copied this over from PEAR::DB. So yeah this stuff should be discussed and any changes should be done to both packages. > - is there some reason not to follow PEAR_Errors API? - you appear to > raise errors with null messages.. Uhm. I tried my best :-) I never really looked at the PEAR_Errors API but just used code I found. What should I rather do? > - looks like DECIMAL needs real support still :) Yeah. This is on the list. For now I focused on structural and API related stuff. > - I would have been tempted to use temporary variables for the get > decaration.. > > return "$name INT" . (isset($field['default']) ? ' DEFAULT ' . > $field['default'] : '') . (isset($field['notnull']) ? ' NOT > NULL' : ''); > > or > $default = isset($field['default']) ? ' DEFAULT '.$field['default']:''; > $notnull = isset($field['notnull']) ? ' NOT NULL' : ''; > > return "$name INT $default $notnull"; > > - just a little clearer.. - and performance is not likely to be an issue > here :) Yeah. I started to format that stuff a bit. But I guess breaking it up is even better. > After all that.. > Its really looking like a nice API, and the code is really well laid out > now.. thx. Regards, Lukas

« previous php.pear.dev (#20124) next »