Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,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`),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I forgot the accidental comma! Note to self to fix it in an upcoming PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Silly mistake; my fault again for being sloppy here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, you're fine!

* The SQL statement should be aborted with an error (:const:`!SQLITE_DENY`)
* The column should be treated as a ``NULL`` value (:const:`!SQLITE_IGNORE`)
Comment thread
erlend-aasland marked this conversation as resolved.

.. data:: apilevel

String constant stating the supported DB-API level. Required by the DB-API.
Expand Down Expand Up @@ -792,10 +803,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``
Expand Down