Re: PDBPLUS
| From: | Yavor Shahpasov | Date: | Fri, 08 Feb 2002 18:27:40 +0000 |
| Subject: | Re: PDBPLUS | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-4506@lists.php.net to get a copy of this message | ||
Tomas V.V.Cox said:
> Yavor Shahpazov wrote:
>>
>> Do you think a class DB_Schema might be usefull. It would handle
>> schema import and export to an independant xml file. It would use db
>> and xml_parser
>
> Nice :-)
>
>> It could be extended to do the same with data, export to an
>> independant xml format. I have the sructure of the class ready.
>
> Ah good, I'm very interested in this point. Did you see my idea about
> how the export/import stuff could be made? (BTW this weekend I'll
> implement a CSV parser).
>
>> BTW do we have and independant method in DB to get tables in a
>> database
>
> Yes, $db->getListOf('tables');
>
>
> Tomas V.V.Cox
Hi,
I actually did some work this time :)
The class can export the schema (and sequenses using mysql only though),
it detects the sequenses with the _seq suffix. The problem is that there
is no backen support to create the indexes, I can get them from getListOf
() but I have no way of ceating the on the server, maybe this sould be
planned as a feature. The generated file is (hopefully) compatible with
metabase's database xml file, sinse I didn't get a reply from manuel yet
so I started writing it from scratch.
I'm attaching the class to get some feedback. It's not complete so take it
easy :). As far as I can tell it sould go into DB/Schema
Yavor
--
# chown -R us:us yourbase
*** Get your Personalized Email at www.freemail.com.cy ***
**Powered by NetSmart.Com.Cy**