rfc:pdo_driver_specific_parsers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:pdo_driver_specific_parsers [2024/05/02 08:45] – Updated PR: support for more pgsql literals mbeccati | rfc:pdo_driver_specific_parsers [2024/05/20 17:46] (current) – Deprecation notice for "escaped question marks inside dollar quoted string" mbeccati | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: PDO Driver specific SQL parsers ====== | ====== PHP RFC: PDO Driver specific SQL parsers ====== | ||
- | * Version: 0.5 | + | * Version: 0.7 |
* Date: 2024-04-11 | * Date: 2024-04-11 | ||
* Author: Matteo Beccati, mbeccati@php.net | * Author: Matteo Beccati, mbeccati@php.net | ||
Line 42: | Line 42: | ||
- single and double quoted literals with both doubling and backslash as escaping mechanisms (MySQL default) | - single and double quoted literals with both doubling and backslash as escaping mechanisms (MySQL default) | ||
- backtick literals with doubling as escaping mechanism (I also tested and it seems MySQL doesn' | - backtick literals with doubling as escaping mechanism (I also tested and it seems MySQL doesn' | ||
- | - two-dashes, C-style comments, and Hash-comments, albeit I couldn' | + | - two-dashes |
- Tests, as necessary | - Tests, as necessary | ||
- Add a PgSQL specific scanner function: | - Add a PgSQL specific scanner function: | ||
Line 53: | Line 53: | ||
- Add a SqLite specific scanner function: | - Add a SqLite specific scanner function: | ||
- single, double quoted, and backtick literals, with doubling as escaping mechanism | - single, double quoted, and backtick literals, with doubling as escaping mechanism | ||
+ | - square brackets quoting for identifiers | ||
- two-dashes and C-style comments (non-nested) | - two-dashes and C-style comments (non-nested) | ||
- Tests, as necessary | - Tests, as necessary | ||
Line 79: | Line 80: | ||
In order to support dollar-quoted strings on Postgres, the functionality of custom quoting has been added to the common PDO parser function. The change has no side effects for other database drivers. | In order to support dollar-quoted strings on Postgres, the functionality of custom quoting has been added to the common PDO parser function. The change has no side effects for other database drivers. | ||
+ | |||
+ | One minor potential BC-break was reported while researching bug [[https:// | ||
+ | |||
+ | '' | ||
+ | |||
+ | Such BC-compatibility can be removed in the next major version. | ||
+ | |||
===== Research on String Literals, Identifiers, | ===== Research on String Literals, Identifiers, | ||
Line 91: | Line 99: | ||
Several [[https:// | Several [[https:// | ||
- | The RFC aims to support all the above kinds of string literals with string-affecting configuration variables set to their defaults. All comment types will be supported, however " | + | The RFC aims to support all the above kinds of string literals with string-affecting configuration variables set to their defaults. All comment types will be supported. |
==== PostgreSQL ==== | ==== PostgreSQL ==== | ||
Line 121: | Line 129: | ||
Almost SQL standard [[https:// | Almost SQL standard [[https:// | ||
- | The RFC aims to support single-quoted, | + | The RFC aims to support single-quoted, |
==== SQL Server ==== | ==== SQL Server ==== | ||
Line 163: | Line 171: | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
- | No expected | + | No BC breaks, but a deprecation notice will be raised when using the " |
Users having applications that can work with multiple database engines should still be very careful and write portable queries, possibly using the '' | Users having applications that can work with multiple database engines should still be very careful and write portable queries, possibly using the '' | ||
Line 209: | Line 217: | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== | ||
- | [[https:// | + | [[https:// |
===== References ===== | ===== References ===== |
rfc/pdo_driver_specific_parsers.1714639540.txt.gz · Last modified: 2024/05/02 08:45 by mbeccati