ZF-1694: Class to execute a SQL script
Description
This is a feature request for a class or method that executes a SQL script.
The class should recognize the syntax supported by SQL scripts of each respective RDBMS brand, if possible.
This should be written as a proposal using our development process.
Comments
Posted by Darby Felton (darby) on 2007-11-07T15:26:23.000+0000
Resolving as "Won't Fix," pending reasonable justification for reopening.
Posted by Wil Sinclair (wil) on 2007-11-08T20:57:33.000+0000
Reopening with target release set to none until we get more feedback on this feature. If it is determined that we will not implement this feature in any future release, it may be closed with 'Won't Fix'.
Posted by Wil Sinclair (wil) on 2008-03-25T20:43:52.000+0000
Please categorize/fix as needed.
Posted by Wil Sinclair (wil) on 2008-04-18T13:11:53.000+0000
This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.
Posted by Wil Sinclair (wil) on 2008-12-08T16:41:51.000+0000
Ralph, please evaluate and decide if/how we should act on this.
Posted by Ralph Schindler (ralph) on 2008-12-09T11:07:43.000+0000
This is difficult, def. not something that we could handle as a feature via Issue tracker.
At current, the availability of multiple statements per query in any of the php db extensions is varied across the board. Even in PDO, there are different procedures on how to execute multiple statements with a single api call (whether to execute or not).
This means that each query in a single script would need to be parsed out. That being the case, one would have to have an SQL Tokenizer or Parser to identify when a query stops (assuming the user didnt change the delimiter).
That said, in order to do those tasks, a major component would need to be proposed and developed, and IMO, its gonna be a large undertaking.
So, that said, should i close this for now?
Posted by Bill Karwin (bkarwin) on 2008-12-09T11:44:04.000+0000
I logged this issue to keep note of a users' feature request a long time ago. But I wouldn't recommend doing it within the scope of the ZF project. It'd be a major project in itself.
Imagine that you need to accommodate script behavior including the following:
...and that's just for MySQL. Imagine implementing and testing a whole different set of syntax and rules like the above for Oracle, PostgreSQL, and all other databases supported by Zend_Db.