Skip to content

Commit 4c10dba

Browse files
gh-95235: Document undocumented parameters in sqlite3 functions and methods (GH-95236)
Co-authored-by: CAM Gerlach <[email protected]> (cherry picked from commit ac6a94c) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
1 parent 9217051 commit 4c10dba

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
@@ -573,7 +573,7 @@ Connection Objects
573573

574574
.. method:: set_authorizer(authorizer_callback)
575575

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

600600
.. method:: set_progress_handler(progress_handler, n)
601601

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

615615
.. method:: set_trace_callback(trace_callback)
616616

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

620620
The only argument passed to the callback is the statement (as
621621
:class:`str`) that is being executed. The return value of the callback is
@@ -638,8 +638,10 @@ Connection Objects
638638

639639
.. method:: enable_load_extension(enabled, /)
640640

641-
This routine allows/disallows the SQLite engine to load SQLite extensions
642-
from shared libraries. SQLite extensions can define new functions,
641+
Enable the SQLite engine to load SQLite extensions from shared libraries
642+
if *enabled* is :const:`True`;
643+
else, disallow loading SQLite extensions.
644+
SQLite extensions can define new functions,
643645
aggregates or whole new virtual table implementations. One well-known
644646
extension is the fulltext-search extension distributed with SQLite.
645647

@@ -656,9 +658,9 @@ Connection Objects
656658

657659
.. method:: load_extension(path, /)
658660

659-
This routine loads an SQLite extension from a shared library. You have to
660-
enable extension loading with :meth:`enable_load_extension` before you can
661-
use this routine.
661+
Load an SQLite extension from a shared library located at *path*.
662+
Enable extension loading with :meth:`enable_load_extension` before
663+
calling this method.
662664

663665
Loadable extensions are disabled by default. See [#f1]_.
664666

@@ -867,8 +869,10 @@ Cursor Objects
867869

868870
.. method:: execute(sql, parameters=(), /)
869871

870-
Execute an SQL statement. Values may be bound to the statement using
871-
:ref:`placeholders <sqlite3-placeholders>`.
872+
Execute SQL statement *sql*.
873+
Bind values to the statement using :ref:`placeholders
874+
<sqlite3-placeholders>` that map to the :term:`sequence` or :class:`dict`
875+
*parameters*.
872876

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

884888
.. method:: executemany(sql, seq_of_parameters, /)
885889

886-
Execute a :ref:`parameterized <sqlite3-placeholders>` SQL command
890+
Execute :ref:`parameterized <sqlite3-placeholders>` SQL statement *sql*
887891
against all parameter sequences or mappings found in the sequence
888892
*seq_of_parameters*. It is also possible to use an
889893
:term:`iterator` yielding parameters instead of a sequence.
@@ -898,7 +902,7 @@ Cursor Objects
898902

899903
.. method:: executescript(sql_script, /)
900904

901-
Execute multiple SQL statements at once.
905+
Execute the SQL statements in *sql_script*.
902906
If there is a pending transaciton,
903907
an implicit ``COMMIT`` statement is executed first.
904908
No other implicit transaction control is performed;

0 commit comments

Comments
 (0)