@@ -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.
@@ -945,9 +945,10 @@ Connection objects
945
945
946
946
.. method :: set_authorizer(authorizer_callback)
947
947
948
- Register callable *authorizer_callback * to be invoked for each attempt to
949
- access a column of a table in the database. The callback should return
950
- one of :const: `SQLITE_OK `, :const: `SQLITE_DENY `, or :const: `SQLITE_IGNORE `
948
+ Register :term: `callable ` *authorizer_callback * to be invoked
949
+ for each attempt to access a column of a table in the database.
950
+ The callback should return one of :const: `SQLITE_OK `,
951
+ :const: `SQLITE_DENY `, or :const: `SQLITE_IGNORE `
951
952
to signal how access to the column should be handled
952
953
by the underlying SQLite library.
953
954
@@ -970,7 +971,7 @@ Connection objects
970
971
971
972
.. method :: set_progress_handler(progress_handler, n)
972
973
973
- Register callable *progress_handler * to be invoked for every *n *
974
+ Register :term: ` callable ` *progress_handler * to be invoked for every *n *
974
975
instructions of the SQLite virtual machine. This is useful if you want to
975
976
get called from SQLite during long-running operations, for example to update
976
977
a GUI.
@@ -985,8 +986,8 @@ Connection objects
985
986
986
987
.. method :: set_trace_callback(trace_callback)
987
988
988
- Register callable *trace_callback * to be invoked for each SQL statement
989
- that is actually executed by the SQLite backend.
989
+ Register :term: ` callable ` *trace_callback * to be invoked
990
+ for each SQL statement that is actually executed by the SQLite backend.
990
991
991
992
The only argument passed to the callback is the statement (as
992
993
:class: `str `) that is being executed. The return value of the callback is
@@ -1136,8 +1137,8 @@ Connection objects
1136
1137
Defaults to ``-1 ``.
1137
1138
1138
1139
:param progress:
1139
- If set to a callable, it is invoked with three integer arguments for
1140
- every backup iteration:
1140
+ If set to a :term: ` callable `,
1141
+ it is invoked with three integer arguments for every backup iteration:
1141
1142
the *status * of the last iteration,
1142
1143
the *remaining * number of pages still to be copied,
1143
1144
and the *total * number of pages.
@@ -1401,8 +1402,8 @@ Connection objects
1401
1402
1402
1403
.. attribute :: text_factory
1403
1404
1404
- A callable that accepts a :class: `bytes ` parameter and returns a text
1405
- representation of it.
1405
+ A :term: ` callable ` that accepts a :class: `bytes ` parameter
1406
+ and returns a text representation of it.
1406
1407
The callable is invoked for SQLite values with the ``TEXT `` data type.
1407
1408
By default, this attribute is set to :class: `str `.
1408
1409
If you want to return ``bytes `` instead, set *text_factory * to ``bytes ``.
0 commit comments