Re: MDB 2.x
| From: | Alan Knowles | Date: | Tue, 26 Aug 2003 09:21:42 +0000 |
| Subject: | Re: MDB 2.x | ||
| References: | 1 2 | Groups: | php.pear.dev php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20519@lists.php.net to get a copy of this message | ||
Just been playing with it.. - a few more feature requests... :)
A)
would it be worth considering adding as many native types as possible to the drivers?
possibly in a format like this...
within type/common..
getDeclaration($db,$type,$name,$fields) {
if (method_exists("get{$type}Declaration",$this)) {
return $this->{"get{$type}Declaration"}($db,
$name,$fields);
}return MDB::RaiseError(); } I really needed to use varchar.. today.. B) for the modules, a more generic loader mechanism would be nice.. eg. $manager = &MDB_Manager::factory('mysql'); $types = &MDB_DataTypes::factory('mysql'); function &factory($driver) { $mdb = MDB::factory($driver); return $mdb->loadModule('manager'); } C) consider loading the connection into the class when you create it.. eg.. in loadModule $this->{$module} = new $class; $this->{$module}->db = &$this; reutrn $this->{$module}; } that way you dont need to keep passing $db to all the methods....? Regards Alan Lukas Smith wrote:
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comFrom: Alan Knowles [mailto:alan@akbkhome.com] Sent: Wednesday, August 20, 2003 3:57 AM- looks like DECIMAL needs real support still :)ok mysql and pgsql both now use the native datatypes. Btw I forgot to mention one new feature in MDB 2.x. There is a new option called 'result_buffering'. The default is true which is how MDB 1.x behaved. Turning this feature off will result in the query results not being buffered. This means that certain features will no longer work, such as numRows, seeking back in the result set etc. However for certain applications this is a very important feature as you can now handle really large result sets without such a huge memory footprint. Regards, Lukas