From c40858c7537dbc79e5f6c29327bab24e98fd39ef Mon Sep 17 00:00:00 2001 From: lacatoire Date: Wed, 19 Aug 2026 09:23:07 +0200 Subject: [PATCH] sqlite3: document lastExtendedErrorCode() and enableExtendedResultCodes() Both methods have existed since PHP 8.0 without a manual page. Also fixes the lastInsertRowID casing in versions.xml and describes the OK, DENY and IGNORE authorizer constants. --- reference/sqlite3/sqlite3.xml | 14 +++- .../sqlite3/enableextendedresultcodes.xml | 73 +++++++++++++++++++ .../sqlite3/sqlite3/lastextendederrorcode.xml | 67 +++++++++++++++++ reference/sqlite3/versions.xml | 4 +- 4 files changed, 154 insertions(+), 4 deletions(-) create mode 100644 reference/sqlite3/sqlite3/enableextendedresultcodes.xml create mode 100644 reference/sqlite3/sqlite3/lastextendederrorcode.xml diff --git a/reference/sqlite3/sqlite3.xml b/reference/sqlite3/sqlite3.xml index b5c7eeebdb27..e04d0e6de4b3 100644 --- a/reference/sqlite3/sqlite3.xml +++ b/reference/sqlite3/sqlite3.xml @@ -263,21 +263,29 @@ SQLite3::OK - + + Returned from an authorizer callback to allow the action. + SQLite3::DENY - + + Returned from an authorizer callback to abort the SQL statement with an + error. + SQLite3::IGNORE - + + Returned from an authorizer callback to disallow the specific action, + treating it as a no-op rather than an error. + diff --git a/reference/sqlite3/sqlite3/enableextendedresultcodes.xml b/reference/sqlite3/sqlite3/enableextendedresultcodes.xml new file mode 100644 index 000000000000..0af59b1fffb8 --- /dev/null +++ b/reference/sqlite3/sqlite3/enableextendedresultcodes.xml @@ -0,0 +1,73 @@ + + + + + SQLite3::enableExtendedResultCodes + + Enables or disables the use of extended result codes + + + + + &reftitle.description; + + public boolSQLite3::enableExtendedResultCodes + boolenable&true; + + + Enables or disables the use of extended result codes, which are then + reported by SQLite3::lastExtendedErrorCode. + + + + + &reftitle.parameters; + + + enable + + + Whether to enable (&true;) or disable (&false;) the use of extended + result codes. + + + + + + + + &reftitle.returnvalues; + + Returns &true; on success or &false; on failure. + + + + + &reftitle.seealso; + + SQLite3::lastExtendedErrorCode + SQLite3::lastErrorCode + + + + + diff --git a/reference/sqlite3/sqlite3/lastextendederrorcode.xml b/reference/sqlite3/sqlite3/lastextendederrorcode.xml new file mode 100644 index 000000000000..f72620406210 --- /dev/null +++ b/reference/sqlite3/sqlite3/lastextendederrorcode.xml @@ -0,0 +1,67 @@ + + + + + SQLite3::lastExtendedErrorCode + + Returns the numeric extended result code of the most recent failed SQLite request + + + + + &reftitle.description; + + public intSQLite3::lastExtendedErrorCode + + + + Returns the numeric extended result code of the most recent failed SQLite + request. Extended result codes must first be enabled with + SQLite3::enableExtendedResultCodes; otherwise the + primary result code is returned. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns an integer value representing the numeric extended result code of + the most recent failed SQLite request. + + + + + &reftitle.seealso; + + SQLite3::enableExtendedResultCodes + SQLite3::lastErrorCode + SQLite3::lastErrorMsg + + + + + diff --git a/reference/sqlite3/versions.xml b/reference/sqlite3/versions.xml index 48829a4f4a6d..9ec4b381e73d 100644 --- a/reference/sqlite3/versions.xml +++ b/reference/sqlite3/versions.xml @@ -13,11 +13,13 @@ + - + +