Expose pdo_parse_params to userspace
| From: | Karoly Negyesi | Date: | Wed, 11 Oct 2023 15:03:05 +0000 |
| Subject: | Expose pdo_parse_params to userspace | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-121271@lists.php.net to get a copy of this message | ||
Hello,
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. It can't
be too hard (famous last words).
Thanks
Karoly Negyesi