@@ -413,15 +413,15 @@ Module functions
413
413
414
414
.. function :: register_adapter(type, adapter, /)
415
415
416
- Register an *adapter * callable to adapt the Python type *type * into an
417
- SQLite type.
416
+ Register an *adapter * :term: ` callable ` to adapt the Python type *type *
417
+ into an SQLite type.
418
418
The adapter is called with a Python object of type *type * as its sole
419
419
argument, and must return a value of a
420
420
:ref: `type that SQLite natively understands <sqlite3-types >`.
421
421
422
422
.. function :: register_converter(typename, converter, /)
423
423
424
- Register the *converter * callable to convert SQLite objects of type
424
+ Register the *converter * :term: ` callable ` to convert SQLite objects of type
425
425
*typename * into a Python object of a specific type.
426
426
The converter is invoked for all SQLite values of type *typename *;
427
427
it is passed a :class: `bytes ` object and should return an object of the
@@ -484,7 +484,7 @@ Module constants
484
484
SQLITE_DENY
485
485
SQLITE_IGNORE
486
486
487
- Flags that should be returned by the *authorizer_callback * callable
487
+ Flags that should be returned by the *authorizer_callback * :term: ` callable `
488
488
passed to :meth: `Connection.set_authorizer `, to indicate whether:
489
489
490
490
* Access is allowed (:const: `!SQLITE_OK `),
@@ -629,8 +629,8 @@ Connection objects
629
629
630
630
Create and return a :class: `Cursor ` object.
631
631
The cursor method accepts a single optional parameter *factory *. If
632
- supplied, this must be a callable returning an instance of :class: ` Cursor `
633
- or its subclasses.
632
+ supplied, this must be a :term: ` callable ` returning
633
+ an instance of :class: ` Cursor ` or its subclasses.
634
634
635
635
.. method :: blobopen(table, column, row, /, *, readonly=False, name="main")
636
636
@@ -723,7 +723,7 @@ Connection objects
723
723
If ``-1 ``, it may take any number of arguments.
724
724
725
725
:param func:
726
- A callable that is called when the SQL function is invoked.
726
+ A :term: ` callable ` that is called when the SQL function is invoked.
727
727
The callable must return :ref: `a type natively supported by SQLite
728
728
<sqlite3-types>`.
729
729
Set to ``None `` to remove an existing SQL function.
@@ -948,9 +948,10 @@ Connection objects
948
948
949
949
.. method :: set_authorizer(authorizer_callback)
950
950
951
- Register callable *authorizer_callback * to be invoked for each attempt to
952
- access a column of a table in the database. The callback should return
953
- one of :const: `SQLITE_OK `, :const: `SQLITE_DENY `, or :const: `SQLITE_IGNORE `
951
+ Register :term: `callable ` *authorizer_callback * to be invoked
952
+ for each attempt to access a column of a table in the database.
953
+ The callback should return one of :const: `SQLITE_OK `,
954
+ :const: `SQLITE_DENY `, or :const: `SQLITE_IGNORE `
954
955
to signal how access to the column should be handled
955
956
by the underlying SQLite library.
956
957
@@ -973,7 +974,7 @@ Connection objects
973
974
974
975
.. method :: set_progress_handler(progress_handler, n)
975
976
976
- Register callable *progress_handler * to be invoked for every *n *
977
+ Register :term: ` callable ` *progress_handler * to be invoked for every *n *
977
978
instructions of the SQLite virtual machine. This is useful if you want to
978
979
get called from SQLite during long-running operations, for example to update
979
980
a GUI.
@@ -988,8 +989,8 @@ Connection objects
988
989
989
990
.. method :: set_trace_callback(trace_callback)
990
991
991
- Register callable *trace_callback * to be invoked for each SQL statement
992
- that is actually executed by the SQLite backend.
992
+ Register :term: ` callable ` *trace_callback * to be invoked
993
+ for each SQL statement that is actually executed by the SQLite backend.
993
994
994
995
The only argument passed to the callback is the statement (as
995
996
:class: `str `) that is being executed. The return value of the callback is
@@ -1139,8 +1140,8 @@ Connection objects
1139
1140
Defaults to ``-1 ``.
1140
1141
1141
1142
:param progress:
1142
- If set to a callable, it is invoked with three integer arguments for
1143
- every backup iteration:
1143
+ If set to a :term: ` callable `,
1144
+ it is invoked with three integer arguments for every backup iteration:
1144
1145
the *status * of the last iteration,
1145
1146
the *remaining * number of pages still to be copied,
1146
1147
and the *total * number of pages.
@@ -1404,8 +1405,8 @@ Connection objects
1404
1405
1405
1406
.. attribute :: text_factory
1406
1407
1407
- A callable that accepts a :class: `bytes ` parameter and returns a text
1408
- representation of it.
1408
+ A :term: ` callable ` that accepts a :class: `bytes ` parameter
1409
+ and returns a text representation of it.
1409
1410
The callable is invoked for SQLite values with the ``TEXT `` data type.
1410
1411
By default, this attribute is set to :class: `str `.
1411
1412
If you want to return ``bytes `` instead, set *text_factory * to ``bytes ``.
0 commit comments