Re: [PDO] Asynchronous requests
[email protected] (Matteo Beccati) Tue, 03 Nov 2009 14:44:42 +0100
| Newsgroups | php.pdo |
|---|---|
| Message-ID | <[email protected]> |
Hi, Lukas wrote: > Well, but that means you cannot use PDO if you do want to use some of > these features. This cannot be the long term vision. The long term > vision imho must be to get rid of the old extensions (even if only in > PHP7). Way back then I was hoping that we could cast PDO connections so > that they could be used with the native extensions as a fallback, but > this was apparently not possible. So I see no way around making it > possible to provide such functionality inside PDO. > > Lets think things further. We get a new driver that works with an RDBMS > that doesnt support transactions .. or doesnt support > autoincrement/sequences. I think we have to accept that not all drivers > will support all features provided by PDO. What we do need to make sure > is that there is proper error handling in place for this situation and > that these issues are sufficiently documented. > > To me the question is just when a feature is ready to become part of the > unified layer and how to deal with features we are not yet sure about. > > like with async .. lets say for now we are not yet sure enough about a > unified API so we prefix: > PDO_MySQL::mysqlAsyncQuery() > PDO:PgSQL::pgsqlAsyncQuery() > > one day we become more comfortable and add it to PDO core throwing an > error/exception if the feature is not available: > PDO::asyncQuery() +1 I want to use PDO for a number of reasons, but I don't want it to get in my way, should I want to use some advanced database features in my application. Cheers -- Matteo Beccati