php / php-src

The PHP Interpreter
https://www.php.net
Other
38.22k stars 7.75k forks source link

Expose pdo_parse_params to userspace #12414

Open chx opened 1 year ago

chx commented 1 year ago

Description

Drupal has been using PDO for a long time now but as it doesn't have async support, the project is adding a mysqli driver. A sticky point here is the lack of support for named placeholders which are widely used in Drupal land but mysqli doesn't support them. Currently the project is considering parsing the SQL string in userspace to convert the named placeholders to positional ones. This does seem like a waste because PDO already contains battle tested, performant code to do this: pdo_parse_params. Exposing this to userspace would solve the problem. What do you think? If the maintainers of the project agree to the idea I can take a stab at coding this.

SakiTakamachi commented 1 year ago

It would be nice to solicit opinions here, but considering the content, I think it's probably better to post to the internals mailing list.

I think this will probably require an RFC, but you can see how people react to your idea before creating an RFC.

chx commented 1 year ago

An RFC just to add a function?? OK. I will mail internals.

SakiTakamachi commented 1 year ago

It is my opinion that RFC is necessary, so when posting to internals, it would be a good idea to also ask whether RFC is necessary.

In any case, it makes sense to post to internals, since you'll also get reactions from people who don't always look at github.

SakiTakamachi commented 1 year ago

@kamil-tekiela

I tag you because it was about mysqli. Do you think an RFC is necessary?

kamil-tekiela commented 1 year ago

Yes, RFC is necessary.

On Wed, Oct 11, 2023, 17:21 Saki Takamachi @.***> wrote:

@kamil-tekiela https://github.com/kamil-tekiela

I tag you because it was about mysqli. Do you think an RFC is necessary?

— Reply to this email directly, view it on GitHub https://github.com/php/php-src/issues/12414#issuecomment-1757941853, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSHGGDVGCZLRBNNL67BVPLX622QDANCNFSM6AAAAAA53WCRCU . You are receiving this because you were mentioned.Message ID: @.***>