Re: [RFC] Driver-Specific PDO Param Types
| From: | Matteo Beccati | Date: | Thu, 20 Oct 2016 11:41:44 +0000 |
| Subject: | Re: [RFC] Driver-Specific PDO Param Types | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96517@lists.php.net to get a copy of this message | ||
Hi Adam,
On 19/10/2016 00:05, Adam Baratz wrote:
> I've created an RFC to change how types are defined in PDO:
> https://wiki.php.net/rfc/driver-specific-pdo-param-types
>
> Please share your feedback. I'm happy to hear thoughts about the pdo_dblib
> example, but the RFC is more about the possibility of driver-specific types
> than these particular ones.
I've had a cursory look. Looks good to me and it doesn't impact the
other drivers.
One little nitpick is that technically the PDO_PARAM_INPUT_OUTPUT flags
is now in the PDO_PARAM_DRIVER_SPECIFIC range and you add custom flags
that one day might overlap with newly added generic ones.
So maybe we need two driver specific ranges, e.g.
PDO_PARAM_DRIVER_SPECIFIC = 1000,
/* magic flag to denote a parameter as being input/output */
PDO_PARAM_INPUT_OUTPUT = 0x00010000
/* this defines the start of the range for driver specific flags */
PDO_PARAM_DRIVER_SPECIFIC_FLAG = 0x01000000
Since you're changing the API number, it shouldn't be a problem to
modify PDO_PARAM_INPUT_OUTPUT, and this should leave plenty of room for
new generic flags and both driver specific params and flags.
Cheers
--
Matteo Beccati
Development & Consulting - http://www.beccati.com/