Hello Adam,

> From: Adam Baratz [mailto:adambar...@php.net] 
> Sent: Friday, May 19, 2017 1:26 PM

>> Maybe even a better way is just to change default param type from PARAM_STR 
>> to PARAM_AUTO in bindValue family routines, without any driver options or 
>> configs.
>> So if drivers supports server prepares with type hinting, OK: treat it 
>> better, if not, push it as a string like is now.

> I'm not sure that changes the proposal too much. My position is still that 
> I'd like PDO to be less "magical," to put more of the burden on providing the 
> right content to the user.

Do you think by replacing default PARAM_STR with PARAM_AUTO will do a lot of 
magic?, it seems really minor or nothing at all
It will just prevent casting ZVAL internally to a string ZVAL for a few drivers 
that supports server side prepares.
Each PDO driver will have a static bool property that will control this 
behavior with defaults as it works now.
It should not break any portability across drivers, especially when this data 
type is explicitly specified.
Can you find a sample where this change will have some impact?

How "your" driver works when you do bindValue('param', false) and expected 
field type on the server is a boolean?

I think server side prepares are a really good feature that we should take into 
account for servers providing this, not just by cutting features because of 
some that do not support it.



ps. Sorry for previous message, sent by mistake, anyone could delete it?

-
D.



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to