php-src/ext/pdo
Nikita Popov caa710037e Rewrite PDO result binding
Instead of requiring the type to be determined in advance by the
describer function and then requiring get_col to return a buffer
of appropriate type, allow get_col to return an arbitrary zval.
See UPGRADING.INTERNALS for a more detailed description of the
change.

This makes the result fetching simpler, more efficient and more
flexible. The general possibility already existed via the special
PDO_PARAM_ZVAL type, but the usage was very inconvenient and/or
inefficient. Now it's possible to easily implement behavior like
"return int if it fits, otherwise string" and to avoid any kind
of complex management of temporary buffers.

This also fixes bug #40913 (our second highest voted bug of all
time, for some reason). PARAM_LOB result bindings will now
consistently return a stream resource, independently of the used
database driver.

I've tried my best to update all PDO drivers for this change, but
some of the changes may be broken, as I cannot test or even build
some of these drivers (in particular PDO dblib and PDO oci).
Fixes are appreciated -- a working CI setup would be even more
appreciated ;)
2020-12-22 15:56:34 +01:00
..
tests Rewrite PDO result binding 2020-12-22 15:56:34 +01:00
config.m4 Remove conditional calls of always available macros 2019-07-14 22:24:21 +02:00
config.w32 Change some permissions from 755 to 644 2018-08-28 23:26:49 +02:00
CREDITS Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
Makefile.frag Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
Makefile.frag.w32 Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
pdo_arginfo.h Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
pdo_dbh_arginfo.h Update PDO parameter names 2020-10-05 15:51:36 +02:00
pdo_dbh.c PDO: Store/pass query_string as zend_string 2020-12-14 10:43:28 +01:00
pdo_dbh.stub.php Update PDO parameter names 2020-10-05 15:51:36 +02:00
pdo_sql_parser.re PDO: Store/pass query_string as zend_string 2020-12-14 10:43:28 +01:00
pdo_sqlstate.c Remove mention of PHP major version in Copyright headers 2019-09-25 14:51:43 +02:00
pdo_stmt_arginfo.h Fix PDOStatement::fetchObject() stub 2020-11-24 09:49:30 +01:00
pdo_stmt.c Rewrite PDO result binding 2020-12-22 15:56:34 +01:00
pdo_stmt.stub.php Fix PDOStatement::fetchObject() stub 2020-11-24 09:49:30 +01:00
pdo.c Drop php_pdo_get_exception_base() function 2020-08-11 17:40:39 +02:00
pdo.stub.php Generate function entries for another batch of extensions 2020-04-05 21:15:30 +02:00
php_pdo_driver.h Rewrite PDO result binding 2020-12-22 15:56:34 +01:00
php_pdo_error.h Remove mention of PHP major version in Copyright headers 2019-09-25 14:51:43 +02:00
php_pdo_int.h Make various failure conditions in PDO unconditional errors 2020-09-28 18:51:36 +01:00
php_pdo.h Make various failure conditions in PDO unconditional errors 2020-09-28 18:51:36 +01:00