Skip to content

Commit d6259c5

Browse files
CAM-Gerlacherlend-aaslandezio-melotti
authored
gh-96096: Add undocumented SQLITE_OK/DENY/IGNORE sqlite3 constants (#96134)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
1 parent 04c73e5 commit d6259c5

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

Doc/library/sqlite3.rst

+14-4
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,17 @@ Module constants
447447
This flag may be combined with :const:`PARSE_COLNAMES` using the ``|``
448448
(bitwise or) operator.
449449

450+
.. data:: SQLITE_OK
451+
SQLITE_DENY
452+
SQLITE_IGNORE
453+
454+
Flags that should be returned by the *authorizer_callback* callable
455+
passed to :meth:`Connection.set_authorizer`, to indicate whether:
456+
457+
* Access is allowed (:const:`!SQLITE_OK`),
458+
* The SQL statement should be aborted with an error (:const:`!SQLITE_DENY`)
459+
* The column should be treated as a ``NULL`` value (:const:`!SQLITE_IGNORE`)
460+
450461
.. data:: apilevel
451462

452463
String constant stating the supported DB-API level. Required by the DB-API.
@@ -822,10 +833,9 @@ Connection objects
822833

823834
Register callable *authorizer_callback* to be invoked for each attempt to
824835
access a column of a table in the database. The callback should return
825-
:const:`SQLITE_OK` if access is allowed, :const:`SQLITE_DENY` if the entire SQL
826-
statement should be aborted with an error and :const:`SQLITE_IGNORE` if the
827-
column should be treated as a NULL value. These constants are available in the
828-
:mod:`!sqlite3` module.
836+
one of :const:`SQLITE_OK`, :const:`SQLITE_DENY`, or :const:`SQLITE_IGNORE`
837+
to signal how access to the column should be handled
838+
by the underlying SQLite library.
829839

830840
The first argument to the callback signifies what kind of operation is to be
831841
authorized. The second and third argument will be arguments or ``None``

0 commit comments

Comments
 (0)