Skip to content

Commit 0418d9f

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 94eb1e9 commit 0418d9f

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

Doc/library/sqlite3.rst

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ Connection Objects
487487

488488
.. method:: set_authorizer(authorizer_callback)
489489

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

509509
.. method:: set_progress_handler(progress_handler, n)
510510

511-
This routine registers a callback. The callback is invoked for every *n*
511+
Register callable *progress_handler* to be invoked for every *n*
512512
instructions of the SQLite virtual machine. This is useful if you want to
513513
get called from SQLite during long-running operations, for example to update
514514
a GUI.
@@ -523,8 +523,8 @@ Connection Objects
523523

524524
.. method:: set_trace_callback(trace_callback)
525525

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

529529
The only argument passed to the callback is the statement (as
530530
:class:`str`) that is being executed. The return value of the callback is
@@ -547,8 +547,10 @@ Connection Objects
547547

548548
.. method:: enable_load_extension(enabled, /)
549549

550-
This routine allows/disallows the SQLite engine to load SQLite extensions
551-
from shared libraries. SQLite extensions can define new functions,
550+
Enable the SQLite engine to load SQLite extensions from shared libraries
551+
if *enabled* is :const:`True`;
552+
else, disallow loading SQLite extensions.
553+
SQLite extensions can define new functions,
552554
aggregates or whole new virtual table implementations. One well-known
553555
extension is the fulltext-search extension distributed with SQLite.
554556

@@ -565,9 +567,9 @@ Connection Objects
565567

566568
.. method:: load_extension(path, /)
567569

568-
This routine loads an SQLite extension from a shared library. You have to
569-
enable extension loading with :meth:`enable_load_extension` before you can
570-
use this routine.
570+
Load an SQLite extension from a shared library located at *path*.
571+
Enable extension loading with :meth:`enable_load_extension` before
572+
calling this method.
571573

572574
Loadable extensions are disabled by default. See [#f1]_.
573575

@@ -704,8 +706,10 @@ Cursor Objects
704706

705707
.. method:: execute(sql, parameters=(), /)
706708

707-
Execute an SQL statement. Values may be bound to the statement using
708-
:ref:`placeholders <sqlite3-placeholders>`.
709+
Execute SQL statement *sql*.
710+
Bind values to the statement using :ref:`placeholders
711+
<sqlite3-placeholders>` that map to the :term:`sequence` or :class:`dict`
712+
*parameters*.
709713

710714
:meth:`execute` will only execute a single SQL statement. If you try to execute
711715
more than one statement with it, it will raise a :exc:`Warning`. Use
@@ -720,7 +724,7 @@ Cursor Objects
720724

721725
.. method:: executemany(sql, seq_of_parameters, /)
722726

723-
Execute a :ref:`parameterized <sqlite3-placeholders>` SQL command
727+
Execute :ref:`parameterized <sqlite3-placeholders>` SQL statement *sql*
724728
against all parameter sequences or mappings found in the sequence
725729
*seq_of_parameters*. It is also possible to use an
726730
:term:`iterator` yielding parameters instead of a sequence.
@@ -735,7 +739,7 @@ Cursor Objects
735739

736740
.. method:: executescript(sql_script, /)
737741

738-
Execute multiple SQL statements at once.
742+
Execute the SQL statements in *sql_script*.
739743
If there is a pending transaciton,
740744
an implicit ``COMMIT`` statement is executed first.
741745
No other implicit transaction control is performed;

0 commit comments

Comments
 (0)