RE: [PEAR] MDB 2.0 release and features.
| From: | Lukas Smith | Date: | Fri, 08 Aug 2003 17:18:44 +0000 |
| Subject: | RE: [PEAR] MDB 2.0 release and features. | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7114@lists.php.net to get a copy of this message | ||
> From: Fabrizio Balliano [mailto:fabrizio.balliano@crealabs.it]
> Sent: Friday, August 08, 2003 7:04 PM
> We started developing it with PEAR::DB, now we've switched to
PEAR::MDB
> because we see many possible new features with the MDB Manager.
>
> I'm trying to autodetect database field type using PEAR::MDB, but we
see
> that:
>
> - tableInfo does not return PEAR::MDB field types but the native
types.
Yes, tableinfo is basically just a copy paste from PEAR::DB
> - listTableFields needs a table and does a query for every call.
> - getTableFieldDefinition needs a table and does a query for every
call.
These methods have been written for reverse engineering. So they are the
closest to what you are looking for. However they only really exist for
mysql atm and partially for pgsql. But they were never meant to be used
at run time as they have an insane amount of overhead.
> Is it possible to know the PEAR::MDB compatible field type having a
> result set and not a table?
> Eg: $rs = $mdb->query('SELECT * FROM tab_1 JOIN etc... etc..');
> $real_data_types = $mdb->tableInfo($rs)
> $mdb_data_types = $mdb->tableInfoMDBTypes($rs)
> Could this be implemented in the 2.0 version?
The philisophie that MDB follows is that all type related information
needs to be passed to MDB by the programmer and I do not see this
changing in the future.
But there is hope for you yet!
I am collaborating with Alan Knowles to build a DataObject class on top
of MDB. This class will use the information from the XML schema file. To
increase performance the parsed schema will be stored in a serialized
format that is quicker to parse.
> Are there some news about the 2.0 release date?
Well I would say it will take another 1-2 months for MDB 2.0 to be
finished.
I am mostly done with the refactoring, but there are still a few things
that need to be thought out.
MDB_DataObject will get finished sometime this fall.
Unfortunately I don't have more time for this project. Donations are
welcome to speed up the process ;-)
> Excuse me for all these questions.
No problem at all.
FYI: I am actually separating the Manager from MDB. The new manager will
be insanely more powerful and flexible. However to take advantage of the
datatype abstraction at runtime you still need MDB.
The new Manager will probably be finished in 2-3 months.
Regards,
Lukas