gh-87260: Update sqlite3 signature docs to reflect actual implementat… · python/cpython@5285693

GitHub

@@ -326,9 +326,9 @@ Module functions and constants

326326 float, str or bytes.

327327328328329-.. function:: complete_statement(sql)

329+.. function:: complete_statement(statement)

330330331- Returns :const:`True` if the string *sql* contains one or more complete SQL

331+ Returns :const:`True` if the string *statement* contains one or more complete SQL

332332 statements terminated by semicolons. It does not verify that the SQL is

333333 syntactically correct, only that there are no unclosed string literals and the

334334 statement is terminated by a semicolon.

@@ -447,11 +447,11 @@ Connection Objects

447447:meth:`~Cursor.executescript` on it with the given *sql_script*.

448448 Return the new cursor object.

449449450- .. method:: create_function(name, num_params, func, *, deterministic=False)

450+ .. method:: create_function(name, narg, func, *, deterministic=False)

451451452452 Creates a user-defined function that you can later use from within SQL

453- statements under the function name *name*. *num_params* is the number of

454- parameters the function accepts (if *num_params* is -1, the function may

453+ statements under the function name *name*. *narg* is the number of

454+ parameters the function accepts (if *narg* is -1, the function may

455455 take any number of arguments), and *func* is a Python callable that is

456456 called as the SQL function. If *deterministic* is true, the created function

457457 is marked as `deterministic <https://sqlite.org/deterministic.html>`_, which

@@ -470,12 +470,12 @@ Connection Objects

470470 .. literalinclude:: ../includes/sqlite3/md5func.py

471471472472473- .. method:: create_aggregate(name, num_params, aggregate_class)

473+ .. method:: create_aggregate(name, n_arg, aggregate_class)

474474475475 Creates a user-defined aggregate function.

476476477477 The aggregate class must implement a ``step`` method, which accepts the number

478- of parameters *num_params* (if *num_params* is -1, the function may take

478+ of parameters *n_arg* (if *n_arg* is -1, the function may take

479479 any number of arguments), and a ``finalize`` method which will return the

480480 final result of the aggregate.

481481@@ -570,15 +570,15 @@ Connection Objects

570570 Added support for disabling the authorizer using :const:`None`.

571571572572573- .. method:: set_progress_handler(handler, n)

573+ .. method:: set_progress_handler(progress_handler, n)

574574575575 This routine registers a callback. The callback is invoked for every *n*

576576 instructions of the SQLite virtual machine. This is useful if you want to

577577 get called from SQLite during long-running operations, for example to update

578578 a GUI.

579579580580 If you want to clear any previously installed progress handler, call the

581- method with :const:`None` for *handler*.

581+ method with :const:`None` for *progress_handler*.

582582583583 Returning a non-zero value from the handler function will terminate the

584584 currently executing query and cause it to raise an :exc:`OperationalError`