Re: Proposal: Binary type for PDO

From: Date: Wed, 12 Jul 2023 15:21:33 +0000
Subject: Re: Proposal: Binary type for PDO
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-120795@lists.php.net to get a copy of this message
> On Jul 9, 2023, at 11:29 AM, Dan Ackroyd <Danack@basereality.com> wrote: > > On Fri, 7 Jul 2023 at 18:39, Calvin Buckley <calvin@cmpct.info> wrote: >> >> I'd like to hear any oversights, and what could be done to take this >> further. > > I think someone needs to write some code and some tests, and see what happens. > > It's possible that PARAM_BINARY could be used across all of the PDO > drivers that PHP ships with, and for each of them the behaviour with > that option is sensible. > > It's also possible that the behaviour of binary parameters is bespoke > to each of the drivers, and that it isn't possible to use PARAM_BINARY > in a DB agnostic way. > > The most realistic way to find out which option is more real, is to > write the code + tests....which would need to be done anyway, even > assuming the best case scenario. I have a WIP PR here: https://github.com/php/php-src/pull/11674 I have not implemented MySQL/Postgres/OCI/Firebird support, but I have tests for ODBC, DBLIB, and SQLite. I think your suspicions about it being bespoke might be correct, although the exercise isn’t for naught. Even if a PARAM_BINARY isn’t realistic to implement, it still identifies and has some fixes for PDO_ODBC and PDO_DBLIB that could be used independently from any PARAM_BINARY support. Further review and me figuring out the other drivers could help here.

« previous php.internals (#120795) next »