conceptual questions
| From: | Enrico Ortmann | Date: | Wed, 16 Jun 2004 12:37:49 +0000 |
| Subject: | conceptual questions | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-827@lists.php.net to get a copy of this message | ||
Hello Developers,
The idea of PECL sounds really great but I'm wondering how you could handle the
differences in detail. First of all my scepticism: I'm really happy about the
project and look forward to get it for testing.
But I got are a few questions to your concept:
[1] Do you want to parse a SQL-statement coming from the userland by analysing
whether it was been created for i.e. for Postgres and than translate it in the
specific language for the target dbs like MySQL. Or do you wanna use an own
META-Language like XML like it will propably be used by PEAR::MDB2. And if so,
is that really fast than?
[2] Another problem are UNION Commands I think. Do you want to split a
UNION-Command coming from the application i.e. for MySQL? I believe this
style of SQL you can't execute at MySQL 4.x at present.
[3] What about the following construct:
SELECT FROM tab1 WHERE tab1_id IN (
SELECT tab2_id FROM tab2
);
OK - the given example could likely be transformed into a JOIN construct, but it
is a valid SQL and should be possible to execute. How do you want to handle this
f.e. on MySQL?
[4] Another case for a problem-situation could be the follwing if the name of
col1 is a reserved word like 'count'. Then you have to set the col-name in
quotes.
PG: INSERT INTO tab ("col1","col2") VALUES ( 'val1', 'val2'
);
MySQL: INSERT INTO tab (Žcol1Ž,Žcol2Ž) VALUES ( 'val1', 'val2' );
This is surely a detail and easy to handle by string-replacement but nevertheless
interesting to know how you would like to handle this cases in PECL.
[5] There a lot of questions more like how to react on a CREATE function statement
in specific language [like PL/PGSQL] or TRIGGERS, CONSTRAINS a.s.o. f.e. on MySQL.
I would be glad to here from you because I hope that cases are considered somehow
in the PECL-concept. Which PHP-Version will be the base for PECL? When do you think
it is ready for a seroius test [beta-state or something like that]?
Regards
Rico Ortmann
[ro@radax.net]