Skip to content

Commit ac6a94c

Browse files
gh-95235: Document undocumented parameters in sqlite3 functions and methods (#95236)
Co-authored-by: CAM Gerlach <[email protected]>
1 parent 10b12dd commit ac6a94c

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

Doc/library/sqlite3.rst

+17-13
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ Connection Objects
583583

584584
.. method:: set_authorizer(authorizer_callback)
585585

586-
This routine registers a callback. The callback is invoked for each attempt to
586+
Register callable *authorizer_callback* to be invoked for each attempt to
587587
access a column of a table in the database. The callback should return
588588
:const:`SQLITE_OK` if access is allowed, :const:`SQLITE_DENY` if the entire SQL
589589
statement should be aborted with an error and :const:`SQLITE_IGNORE` if the
@@ -609,7 +609,7 @@ Connection Objects
609609

610610
.. method:: set_progress_handler(progress_handler, n)
611611

612-
This routine registers a callback. The callback is invoked for every *n*
612+
Register callable *progress_handler* to be invoked for every *n*
613613
instructions of the SQLite virtual machine. This is useful if you want to
614614
get called from SQLite during long-running operations, for example to update
615615
a GUI.
@@ -624,8 +624,8 @@ Connection Objects
624624

625625
.. method:: set_trace_callback(trace_callback)
626626

627-
Registers *trace_callback* to be called for each SQL statement that is
628-
actually executed by the SQLite backend.
627+
Register callable *trace_callback* to be invoked for each SQL statement
628+
that is actually executed by the SQLite backend.
629629

630630
The only argument passed to the callback is the statement (as
631631
:class:`str`) that is being executed. The return value of the callback is
@@ -648,8 +648,10 @@ Connection Objects
648648

649649
.. method:: enable_load_extension(enabled, /)
650650

651-
This routine allows/disallows the SQLite engine to load SQLite extensions
652-
from shared libraries. SQLite extensions can define new functions,
651+
Enable the SQLite engine to load SQLite extensions from shared libraries
652+
if *enabled* is :const:`True`;
653+
else, disallow loading SQLite extensions.
654+
SQLite extensions can define new functions,
653655
aggregates or whole new virtual table implementations. One well-known
654656
extension is the fulltext-search extension distributed with SQLite.
655657

@@ -666,9 +668,9 @@ Connection Objects
666668

667669
.. method:: load_extension(path, /)
668670

669-
This routine loads an SQLite extension from a shared library. You have to
670-
enable extension loading with :meth:`enable_load_extension` before you can
671-
use this routine.
671+
Load an SQLite extension from a shared library located at *path*.
672+
Enable extension loading with :meth:`enable_load_extension` before
673+
calling this method.
672674

673675
Loadable extensions are disabled by default. See [#f1]_.
674676

@@ -877,8 +879,10 @@ Cursor Objects
877879

878880
.. method:: execute(sql, parameters=(), /)
879881

880-
Execute an SQL statement. Values may be bound to the statement using
881-
:ref:`placeholders <sqlite3-placeholders>`.
882+
Execute SQL statement *sql*.
883+
Bind values to the statement using :ref:`placeholders
884+
<sqlite3-placeholders>` that map to the :term:`sequence` or :class:`dict`
885+
*parameters*.
882886

883887
:meth:`execute` will only execute a single SQL statement. If you try to execute
884888
more than one statement with it, it will raise a :exc:`ProgrammingError`. Use
@@ -893,7 +897,7 @@ Cursor Objects
893897

894898
.. method:: executemany(sql, seq_of_parameters, /)
895899

896-
Execute a :ref:`parameterized <sqlite3-placeholders>` SQL command
900+
Execute :ref:`parameterized <sqlite3-placeholders>` SQL statement *sql*
897901
against all parameter sequences or mappings found in the sequence
898902
*seq_of_parameters*. It is also possible to use an
899903
:term:`iterator` yielding parameters instead of a sequence.
@@ -908,7 +912,7 @@ Cursor Objects
908912

909913
.. method:: executescript(sql_script, /)
910914

911-
Execute multiple SQL statements at once.
915+
Execute the SQL statements in *sql_script*.
912916
If there is a pending transaciton,
913917
an implicit ``COMMIT`` statement is executed first.
914918
No other implicit transaction control is performed;

0 commit comments

Comments
 (0)