Re: Re: Writing a parser
| From: | Manuel Lemos | Date: | Tue, 09 Jul 2002 19:20:34 +0000 |
| Subject: | Re: Re: Writing a parser | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7601@lists.php.net to get a copy of this message | ||
Hello,
On 07/09/2002 03:59 AM, Pierre-Alain Joye wrote:
It seems to me that "automatically" has such a very high price to be realistic. Usually what differs between databases is data format representation. That can be handled by providing data format conversion functions like Metabase provides. You can either construct the query string manually or use prepared queries. Either way you do not need a SQL parser because you only need to know eventually where are the placeholders, regardless if the query is a SELECT, INSERT, UPDATE, etc..It seems to me that your SQL wrapper would be too slow to be useful, don't you think?Certainly :). Note this feature can be usefull, in some case, to generate differents queries for each DB "automaticly".
Personally I just do a parser only for the structure definition. Next the struct can be compared with another struct or export to a different DB ( here comes mdb ) from a xml schema definition.You don't need a SQL parser for this. Just use database specific schema metadata query functions and thats all. That is what Metabase schema reverse engineering support does. -- Regards, Manuel Lemos