Re: Re: [RFC] Extended String Types For PDO
| From: | Adam Baratz | Date: | Fri, 10 Mar 2017 15:53:36 +0000 |
| Subject: | Re: Re: [RFC] Extended String Types For PDO | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-98472@lists.php.net to get a copy of this message | ||
>
> I've read the links, hence my skepticism and me labeling this as "yet
> another way that SQL Server decides to make things harder and buggy". It is
> a bug in SQL Server, unless I'm missing the reason for this to exist (or
> maybe there was such a reason in 1991).
>
One of the links is MySQL specific. Apart from that, it's not accurate to
characterize this as a bug with MSSQL. They used part of the SQL spec in an
intended way. Yes, it's a little more cumbersome than having a single
string type, but it doesn't help PDO users to wish other designs onto DBs.
As for BC compliance, this will still break code, as current overrides to
> prepared statements (in DBAL, specifically) directly compare the parameter
> type to a constant (no bitmask comparison).
>
I meant that this change won't break existing code. But yes, others may
need to modify their code to be compatible with this new feature. Within
pdo, a bitmask is applied -- see uses of the PDO_PARAM_TYPE macro. It's
probably worth replicating that in DBAL.
Thanks,
Adam