Re: [PDO] Asynchronous requests
[email protected] (Pierre Joye) Tue, 3 Nov 2009 14:26:29 +0100
| Newsgroups | php.pdo |
|---|---|
| Message-ID | <[email protected]> |
hi, 2009/11/3 Lukas Kahwe Smith <[email protected]>: > > well one thing is clear .. PDO must make it possible for driver authors to > support _all_ native functionality, regardless if other rdbms support the > feature or not. where possible it can provide emulation. > > now the tricky thing is that a feature might be support by only one rdbms > today, but that might change. i faintly remember that we already have some > function that only works on one driver (we do have driver specific > attributes already) and these should be prefixed with the name of the > driver. now for features that are available on only a subset of rdbms, we > need to figure out an approach. one approach would be that just as if the > feature is only provided by a single driver, we prefix and wait until all > (most?) rdbms support this so that we feel comfortable to provide a unified > API. > > a problem can of course be if the API is not unifyable or maybe just for a > subset of drivers. i think in this case we need to decide on a case by case > basis if partial unification is ok, or if the driver that doesnt support the > feature with the same api falls back to providing the given functionality > with a prefixed method while throwing an error when calling the unified api. I agree with Ulf and Johannes comment here. The main sources of confusions and portability issues in PDO are these drivers specific behaviors or features (especially as they are shown as core PDO options). I would rather not implement them until we actually make the necessary changes to support them in all drivers, as long as a backend supports this given feature. We have to keep in mind that PDO does not aim to be a new native layer but to provide a common API to access all supported databases in portable way (from an API point of view, at least). Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org