From 124520aae4b16b48822201b578eda56b514422be Mon Sep 17 00:00:00 2001 From: lacatoire Date: Wed, 12 Nov 2025 10:37:04 +0100 Subject: [PATCH 1/4] Add missing PDO_SQLITE constants (SQLITE_ATTR_OPEN_FLAGS, SQLITE_OPEN_READONLY, etc.) --- reference/pdo_sqlite/reference.xml | 267 ++++++++++++++++++----------- 1 file changed, 171 insertions(+), 96 deletions(-) diff --git a/reference/pdo_sqlite/reference.xml b/reference/pdo_sqlite/reference.xml index bb7d982897dd..fe33dc5eac94 100644 --- a/reference/pdo_sqlite/reference.xml +++ b/reference/pdo_sqlite/reference.xml @@ -1,114 +1,189 @@ - - - SQLite PDO Driver (PDO_SQLITE) - SQLite PDO Driver - + + + SQLite PDO Driver (PDO_SQLITE) + SQLite PDO Driver + -
+
&reftitle.intro; + + PDO_SQLITE is a driver that implements the PHP + Data Objects (PDO) interface to enable access to SQLite 3 databases. + + - PDO_SQLITE is a driver that implements the PHP - Data Objects (PDO) interface to enable access to SQLite 3 databases. + PDO_SQLITE allows using strings apart from streams together with + PDO::PARAM_LOB. - - - PDO_SQLITE allows using strings apart from streams together with - PDO::PARAM_LOB. - - -
+ +
- &reference.pdo-sqlite.configure; + &reference.pdo-sqlite.configure; -
+
- - - PDO_SQLITE DSN - Connecting to SQLite databases - + + + PDO_SQLITE DSN + Connecting to SQLite databases + - - &reftitle.description; - - The PDO_SQLITE Data Source Name (DSN) is composed of the following elements: - - - DSN prefix (SQLite 3) - - - The DSN prefix is sqlite:. - - - - To access a database on disk, the absolute path has to be appended to the - DSN prefix. - - - - - To create a database in memory, :memory: has to be appended - to the DSN prefix. - - - - - If the DSN consists of the DSN prefix only, a temporary database is used, - which is deleted when the connection is closed. - - - - - - - - - - - &reftitle.examples; - - - PDO_SQLITE DSN examples - - The following examples show PDO_SQLITE DSN for connecting to - SQLite databases: - - + &reftitle.description; + + The PDO_SQLITE Data Source Name (DSN) is composed of the following elements: + + + DSN prefix (SQLite 3) + + + The DSN prefix is sqlite:. + + + + To access a database on disk, the absolute path has to be appended to the + DSN prefix. + + + + + To create a database in memory, :memory: has to be appended + to the DSN prefix. + + + + + If the DSN consists of the DSN prefix only, a temporary database is used, + which is deleted when the connection is closed. + + + + + + + + + + + + &reftitle.examples; + + + PDO_SQLITE DSN examples + + The following examples show PDO_SQLITE DSN for connecting to + SQLite databases: + + - - - - - - + + + + + + + +
+ &reftitle.constants; + + + PDO::SQLITE_ATTR_OPEN_FLAGS + + Allows control over how the SQLite database file is opened. + Accepts a bitmask combination of PDO::SQLITE_OPEN_READONLY, + PDO::SQLITE_OPEN_READWRITE, and + PDO::SQLITE_OPEN_CREATE. + + + + SQLite open flags + + + + + PDO::SQLITE_OPEN_READONLY + + Opens the database in read-only mode. Fails if the database does not exist. + + + + + + PDO::SQLITE_OPEN_READWRITE + + Opens the database in read/write mode. Fails if the database does not exist. + + + + + + PDO::SQLITE_OPEN_CREATE + + Creates the database if it does not exist. + + + + + + PDO::SQLITE_ATTR_READONLY_STATEMENT + + Returns whether a prepared statement is read-only. + + + + + + PDO::SQLITE_ATTR_EXTENDED_RESULT_CODES + + Enables or disables the use of extended result codes in SQLite. + + + + SQLite result and extended result codes + + + + + PDO::SQLITE_DETERMINISTIC + + Indicates that a user-defined function behaves deterministically, which allows + SQLite to perform additional optimizations. + + + + sqlite3_create_function() + + + +
&reference.pdo-sqlite.entities.pdo-overloaded; -
- - + + + From 0f3258424eeae3f31eb63229d7757fd53c7be249 Mon Sep 17 00:00:00 2001 From: Louis-Arnaud <20201470+lacatoire@users.noreply.github.com> Date: Thu, 27 Nov 2025 21:19:33 +0100 Subject: [PATCH 2/4] Update reference/pdo_sqlite/reference.xml Co-authored-by: Gina Peter Banyard --- reference/pdo_sqlite/reference.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/pdo_sqlite/reference.xml b/reference/pdo_sqlite/reference.xml index fe33dc5eac94..5d0d1e7d40bf 100644 --- a/reference/pdo_sqlite/reference.xml +++ b/reference/pdo_sqlite/reference.xml @@ -77,7 +77,7 @@ The following examples show PDO_SQLITE DSN for connecting to SQLite databases: - Date: Thu, 27 Nov 2025 21:24:18 +0100 Subject: [PATCH 3/4] Remove para element --- reference/pdo_sqlite/reference.xml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/reference/pdo_sqlite/reference.xml b/reference/pdo_sqlite/reference.xml index 5d0d1e7d40bf..e116ef5be21b 100644 --- a/reference/pdo_sqlite/reference.xml +++ b/reference/pdo_sqlite/reference.xml @@ -70,22 +70,20 @@ &reftitle.examples; - - - PDO_SQLITE DSN examples - - The following examples show PDO_SQLITE DSN for connecting to - SQLite databases: - + + PDO_SQLITE DSN examples + + The following examples show PDO_SQLITE DSN for connecting to + SQLite databases: + - - - - + + + From 7fc87cf985d58945b63f0093a01488dc45f7778c Mon Sep 17 00:00:00 2001 From: Louis-Arnaud <20201470+lacatoire@users.noreply.github.com> Date: Thu, 27 Nov 2025 21:27:32 +0100 Subject: [PATCH 4/4] Delete documentation for PDO::SQLITE_DETERMINISTIC --- reference/pdo_sqlite/reference.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/reference/pdo_sqlite/reference.xml b/reference/pdo_sqlite/reference.xml index e116ef5be21b..1697307cbf34 100644 --- a/reference/pdo_sqlite/reference.xml +++ b/reference/pdo_sqlite/reference.xml @@ -147,18 +147,6 @@ sqlite: - - PDO::SQLITE_DETERMINISTIC - - Indicates that a user-defined function behaves deterministically, which allows - SQLite to perform additional optimizations. - - - - sqlite3_create_function() - - - &reference.pdo-sqlite.entities.pdo-overloaded;