From 124520aae4b16b48822201b578eda56b514422be Mon Sep 17 00:00:00 2001 From: lacatoire Date: Wed, 12 Nov 2025 10:37:04 +0100 Subject: [PATCH] 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; -
- - + + +