diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-08-23 06:58:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 06:58:17 (GMT) |
commit | e9ede9d2a0376961933c03245199a8f348a9880c (patch) | |
tree | 5bd240ac69770295a6f3264d2d01fee2cbb777d8 /Doc/library | |
parent | 145d8f0e57c8e1c819e76f2e6644013e3305e030 (diff) | |
download | cpython-e9ede9d2a0376961933c03245199a8f348a9880c.zip cpython-e9ede9d2a0376961933c03245199a8f348a9880c.tar.gz cpython-e9ede9d2a0376961933c03245199a8f348a9880c.tar.bz2 |
gh-96096: Add undocumented SQLITE_OK/DENY/IGNORE sqlite3 constants (GH-96134)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit d6259c58cbb48b8f3fbd70047f004ea19fe91e86)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/sqlite3.rst | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index ce009be..be9a22e 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -426,6 +426,17 @@ Module constants This flag may be combined with :const:`PARSE_COLNAMES` using the ``|`` (bitwise or) operator. +.. data:: SQLITE_OK + SQLITE_DENY + SQLITE_IGNORE + + Flags that should be returned by the *authorizer_callback* callable + passed to :meth:`Connection.set_authorizer`, to indicate whether: + + * Access is allowed (:const:`!SQLITE_OK`), + * The SQL statement should be aborted with an error (:const:`!SQLITE_DENY`) + * The column should be treated as a ``NULL`` value (:const:`!SQLITE_IGNORE`) + .. data:: apilevel String constant stating the supported DB-API level. Required by the DB-API. @@ -695,10 +706,9 @@ Connection objects Register callable *authorizer_callback* to be invoked for each attempt to access a column of a table in the database. The callback should return - :const:`SQLITE_OK` if access is allowed, :const:`SQLITE_DENY` if the entire SQL - statement should be aborted with an error and :const:`SQLITE_IGNORE` if the - column should be treated as a NULL value. These constants are available in the - :mod:`!sqlite3` module. + one of :const:`SQLITE_OK`, :const:`SQLITE_DENY`, or :const:`SQLITE_IGNORE` + to signal how access to the column should be handled + by the underlying SQLite library. The first argument to the callback signifies what kind of operation is to be authorized. The second and third argument will be arguments or ``None`` |