@@ -394,15 +394,15 @@ Module functions
394
394
395
395
.. function :: register_adapter(type, adapter, /)
396
396
397
- Register an *adapter * callable to adapt the Python type *type * into an
398
- SQLite type.
397
+ Register an *adapter * :term: ` callable ` to adapt the Python type *type *
398
+ into an SQLite type.
399
399
The adapter is called with a Python object of type *type * as its sole
400
400
argument, and must return a value of a
401
401
:ref: `type that SQLite natively understands <sqlite3-types >`.
402
402
403
403
.. function :: register_converter(typename, converter, /)
404
404
405
- Register the *converter * callable to convert SQLite objects of type
405
+ Register the *converter * :term: ` callable ` to convert SQLite objects of type
406
406
*typename * into a Python object of a specific type.
407
407
The converter is invoked for all SQLite values of type *typename *;
408
408
it is passed a :class: `bytes ` object and should return an object of the
@@ -459,7 +459,7 @@ Module constants
459
459
SQLITE_DENY
460
460
SQLITE_IGNORE
461
461
462
- Flags that should be returned by the *authorizer_callback * callable
462
+ Flags that should be returned by the *authorizer_callback * :term: ` callable `
463
463
passed to :meth: `Connection.set_authorizer `, to indicate whether:
464
464
465
465
* Access is allowed (:const: `!SQLITE_OK `),
@@ -562,8 +562,8 @@ Connection objects
562
562
563
563
Create and return a :class: `Cursor ` object.
564
564
The cursor method accepts a single optional parameter *factory *. If
565
- supplied, this must be a callable returning an instance of :class: ` Cursor `
566
- or its subclasses.
565
+ supplied, this must be a :term: ` callable ` returning
566
+ an instance of :class: ` Cursor ` or its subclasses.
567
567
568
568
.. method :: blobopen(table, column, row, /, *, readonly=False, name="main")
569
569
@@ -647,7 +647,7 @@ Connection objects
647
647
If ``-1 ``, it may take any number of arguments.
648
648
649
649
:param func:
650
- A callable that is called when the SQL function is invoked.
650
+ A :term: ` callable ` that is called when the SQL function is invoked.
651
651
The callable must return :ref: `a type natively supported by SQLite
652
652
<sqlite3-types>`.
653
653
Set to ``None `` to remove an existing SQL function.
@@ -872,9 +872,10 @@ Connection objects
872
872
873
873
.. method :: set_authorizer(authorizer_callback)
874
874
875
- Register callable *authorizer_callback * to be invoked for each attempt to
876
- access a column of a table in the database. The callback should return
877
- one of :const: `SQLITE_OK `, :const: `SQLITE_DENY `, or :const: `SQLITE_IGNORE `
875
+ Register :term: `callable ` *authorizer_callback * to be invoked
876
+ for each attempt to access a column of a table in the database.
877
+ The callback should return one of :const: `SQLITE_OK `,
878
+ :const: `SQLITE_DENY `, or :const: `SQLITE_IGNORE `
878
879
to signal how access to the column should be handled
879
880
by the underlying SQLite library.
880
881
@@ -897,7 +898,7 @@ Connection objects
897
898
898
899
.. method :: set_progress_handler(progress_handler, n)
899
900
900
- Register callable *progress_handler * to be invoked for every *n *
901
+ Register :term: ` callable ` *progress_handler * to be invoked for every *n *
901
902
instructions of the SQLite virtual machine. This is useful if you want to
902
903
get called from SQLite during long-running operations, for example to update
903
904
a GUI.
@@ -912,8 +913,8 @@ Connection objects
912
913
913
914
.. method :: set_trace_callback(trace_callback)
914
915
915
- Register callable *trace_callback * to be invoked for each SQL statement
916
- that is actually executed by the SQLite backend.
916
+ Register :term: ` callable ` *trace_callback * to be invoked
917
+ for each SQL statement that is actually executed by the SQLite backend.
917
918
918
919
The only argument passed to the callback is the statement (as
919
920
:class: `str `) that is being executed. The return value of the callback is
@@ -1045,8 +1046,8 @@ Connection objects
1045
1046
Defaults to ``-1 ``.
1046
1047
1047
1048
:param progress:
1048
- If set to a callable, it is invoked with three integer arguments for
1049
- every backup iteration:
1049
+ If set to a :term: ` callable `,
1050
+ it is invoked with three integer arguments for every backup iteration:
1050
1051
the *status * of the last iteration,
1051
1052
the *remaining * number of pages still to be copied,
1052
1053
and the *total * number of pages.
@@ -1247,8 +1248,8 @@ Connection objects
1247
1248
1248
1249
.. attribute :: text_factory
1249
1250
1250
- A callable that accepts a :class: `bytes ` parameter and returns a text
1251
- representation of it.
1251
+ A :term: ` callable ` that accepts a :class: `bytes ` parameter
1252
+ and returns a text representation of it.
1252
1253
The callable is invoked for SQLite values with the ``TEXT `` data type.
1253
1254
By default, this attribute is set to :class: `str `.
1254
1255
If you want to return ``bytes `` instead, set *text_factory * to ``bytes ``.
0 commit comments