@@ -322,13 +322,13 @@ Module functions and constants
322
322
The :attr: `~Connection.isolation_level ` of the connection,
323
323
controlling whether and how transactions are implicitly opened.
324
324
Can be ``"DEFERRED" `` (default), ``"EXCLUSIVE" `` or ``"IMMEDIATE" ``;
325
- or :const: ` None ` to disable opening transactions implicitly.
325
+ or `` None ` ` to disable opening transactions implicitly.
326
326
See :ref: `sqlite3-controlling-transactions ` for more.
327
- :type isolation_level: str | :const: ` None `
327
+ :type isolation_level: str | None
328
328
329
329
:param check_same_thread:
330
- If :const: ` True ` (default), only the creating thread may use the connection.
331
- If :const: ` False `, the connection may be shared across multiple threads;
330
+ If `` True ` ` (default), only the creating thread may use the connection.
331
+ If `` False ` `, the connection may be shared across multiple threads;
332
332
if so, write operations should be serialized by the user to avoid data
333
333
corruption.
334
334
:type check_same_thread: bool
@@ -345,7 +345,7 @@ Module functions and constants
345
345
:type cached_statements: int
346
346
347
347
:param uri:
348
- If set to :const: ` True `, *database * is interpreted as a
348
+ If set to `` True ` `, *database * is interpreted as a
349
349
:abbr: `URI ( Uniform Resource Identifier ) ` with a file path
350
350
and an optional query string.
351
351
The scheme part *must * be ``"file:" ``,
@@ -394,7 +394,7 @@ Module functions and constants
394
394
395
395
.. function :: complete_statement(statement)
396
396
397
- Returns :const: ` True ` if the string *statement * contains one or more complete SQL
397
+ Returns `` True ` ` if the string *statement * contains one or more complete SQL
398
398
statements terminated by semicolons. It does not verify that the SQL is
399
399
syntactically correct, only that there are no unclosed string literals and the
400
400
statement is terminated by a semicolon.
@@ -410,8 +410,8 @@ Module functions and constants
410
410
Enable or disable callback tracebacks.
411
411
By default you will not get any tracebacks in user-defined functions,
412
412
aggregates, converters, authorizer callbacks etc. If you want to debug them,
413
- you can call this function with *flag * set to :const: ` True `. Afterwards, you
414
- will get tracebacks from callbacks on :data: `sys.stderr `. Use :const: ` False `
413
+ you can call this function with *flag * set to `` True ` `. Afterwards, you
414
+ will get tracebacks from callbacks on :data: `sys.stderr `. Use `` False ` `
415
415
to disable the feature again.
416
416
417
417
Register an :func: `unraisable hook handler <sys.unraisablehook> ` for an
@@ -456,7 +456,7 @@ Connection objects
456
456
457
457
This attribute controls the :ref: `transaction handling
458
458
<sqlite3-controlling-transactions>` performed by ``sqlite3 ``.
459
- If set to :const: ` None `, transactions are never implicitly opened.
459
+ If set to `` None ` `, transactions are never implicitly opened.
460
460
If set to one of ``"DEFERRED" ``, ``"IMMEDIATE" ``, or ``"EXCLUSIVE" ``,
461
461
corresponding to the underlying `SQLite transaction behaviour `_,
462
462
implicit :ref: `transaction management
@@ -470,8 +470,8 @@ Connection objects
470
470
This read-only attribute corresponds to the low-level SQLite
471
471
`autocommit mode `_.
472
472
473
- :const: ` True ` if a transaction is active (there are uncommitted changes),
474
- :const: ` False ` otherwise.
473
+ `` True ` ` if a transaction is active (there are uncommitted changes),
474
+ `` False ` ` otherwise.
475
475
476
476
.. versionadded :: 3.2
477
477
@@ -500,9 +500,9 @@ Connection objects
500
500
:type row: str
501
501
502
502
:param readonly:
503
- Set to :const: ` True ` if the blob should be opened without write
503
+ Set to `` True ` ` if the blob should be opened without write
504
504
permissions.
505
- Defaults to :const: ` False `.
505
+ Defaults to `` False ` `.
506
506
:type readonly: bool
507
507
508
508
:param name:
@@ -574,11 +574,11 @@ Connection objects
574
574
A callable that is called when the SQL function is invoked.
575
575
The callable must return :ref: `a type natively supported by SQLite
576
576
<sqlite3-types>`.
577
- Set to :const: ` None ` to remove an existing SQL function.
578
- :type func: :term: `callback ` | :const: ` None `
577
+ Set to `` None ` ` to remove an existing SQL function.
578
+ :type func: :term: `callback ` | None
579
579
580
580
:param deterministic:
581
- If :const: ` True `, the created SQL function is marked as
581
+ If `` True ` `, the created SQL function is marked as
582
582
`deterministic <https://sqlite.org/deterministic.html >`_,
583
583
which allows SQLite to perform additional optimizations.
584
584
:type deterministic: bool
@@ -617,8 +617,8 @@ Connection objects
617
617
The number of arguments that the ``step() `` method must accept
618
618
is controlled by *n_arg *.
619
619
620
- Set to :const: ` None ` to remove an existing SQL aggregate function.
621
- :type aggregate_class: :term: `class ` | :const: ` None `
620
+ Set to `` None ` ` to remove an existing SQL aggregate function.
621
+ :type aggregate_class: :term: `class ` | None
622
622
623
623
Example:
624
624
@@ -650,13 +650,13 @@ Connection objects
650
650
The number of arguments that the ``step() `` and ``value() `` methods
651
651
must accept is controlled by *num_params *.
652
652
653
- Set to :const: ` None ` to remove an existing SQL aggregate window function.
653
+ Set to `` None ` ` to remove an existing SQL aggregate window function.
654
654
655
655
:raises NotSupportedError:
656
656
If used with a version of SQLite older than 3.25.0,
657
657
which does not support aggregate window functions.
658
658
659
- :type aggregate_class: :term: `class ` | :const: ` None `
659
+ :type aggregate_class: :term: `class ` | None
660
660
661
661
.. versionadded :: 3.11
662
662
@@ -679,7 +679,7 @@ Connection objects
679
679
680
680
.. literalinclude :: ../includes/sqlite3/collation_reverse.py
681
681
682
- Remove a collation function by setting *callable * to :const: ` None `.
682
+ Remove a collation function by setting *callable * to `` None ` `.
683
683
684
684
.. versionchanged :: 3.11
685
685
The collation name can contain any Unicode character. Earlier, only
@@ -703,20 +703,20 @@ Connection objects
703
703
:mod: `sqlite3 ` module.
704
704
705
705
The first argument to the callback signifies what kind of operation is to be
706
- authorized. The second and third argument will be arguments or :const: ` None `
706
+ authorized. The second and third argument will be arguments or `` None ` `
707
707
depending on the first argument. The 4th argument is the name of the database
708
708
("main", "temp", etc.) if applicable. The 5th argument is the name of the
709
709
inner-most trigger or view that is responsible for the access attempt or
710
- :const: ` None ` if this access attempt is directly from input SQL code.
710
+ `` None ` ` if this access attempt is directly from input SQL code.
711
711
712
712
Please consult the SQLite documentation about the possible values for the first
713
713
argument and the meaning of the second and third argument depending on the first
714
714
one. All necessary constants are available in the :mod: `sqlite3 ` module.
715
715
716
- Passing :const: ` None ` as *authorizer_callback * will disable the authorizer.
716
+ Passing `` None ` ` as *authorizer_callback * will disable the authorizer.
717
717
718
718
.. versionchanged :: 3.11
719
- Added support for disabling the authorizer using :const: ` None `.
719
+ Added support for disabling the authorizer using `` None ` `.
720
720
721
721
722
722
.. method :: set_progress_handler(progress_handler, n)
@@ -727,7 +727,7 @@ Connection objects
727
727
a GUI.
728
728
729
729
If you want to clear any previously installed progress handler, call the
730
- method with :const: ` None ` for *progress_handler *.
730
+ method with `` None ` ` for *progress_handler *.
731
731
732
732
Returning a non-zero value from the handler function will terminate the
733
733
currently executing query and cause it to raise a :exc: `DatabaseError `
@@ -747,7 +747,7 @@ Connection objects
747
747
sqlite3 module and the execution of triggers defined in the current
748
748
database.
749
749
750
- Passing :const: ` None ` as *trace_callback * will disable the trace callback.
750
+ Passing `` None ` ` as *trace_callback * will disable the trace callback.
751
751
752
752
.. note ::
753
753
Exceptions raised in the trace callback are not propagated. As a
@@ -761,7 +761,7 @@ Connection objects
761
761
.. method :: enable_load_extension(enabled, /)
762
762
763
763
Enable the SQLite engine to load SQLite extensions from shared libraries
764
- if *enabled * is :const: ` True `;
764
+ if *enabled * is `` True ` `;
765
765
else, disallow loading SQLite extensions.
766
766
SQLite extensions can define new functions,
767
767
aggregates or whole new virtual table implementations. One well-known
@@ -879,8 +879,8 @@ Connection objects
879
879
the *status * of the last iteration,
880
880
the *remaining * number of pages still to be copied,
881
881
and the *total * number of pages.
882
- Defaults to :const: ` None `.
883
- :type progress: :term: `callback ` | :const:` None`
882
+ Defaults to `` None ` `.
883
+ :type progress: :term: `callback ` | None
884
884
885
885
:param name:
886
886
The name of the database to back up.
@@ -1034,7 +1034,7 @@ Cursor objects
1034
1034
:meth: `executescript ` if you want to execute multiple SQL statements with one
1035
1035
call.
1036
1036
1037
- If :attr: `~Connection.isolation_level ` is not :const: ` None `,
1037
+ If :attr: `~Connection.isolation_level ` is not `` None ` `,
1038
1038
*sql * is an ``INSERT ``, ``UPDATE ``, ``DELETE ``, or ``REPLACE `` statement,
1039
1039
and there is no open transaction,
1040
1040
a transaction is implicitly opened before executing *sql *.
@@ -1082,7 +1082,7 @@ Cursor objects
1082
1082
.. method :: fetchone()
1083
1083
1084
1084
Fetch the next row of a query result set as a :class: `tuple `.
1085
- Return :const: ` None ` if no more data is available.
1085
+ Return `` None ` ` if no more data is available.
1086
1086
1087
1087
1088
1088
.. method :: fetchmany(size=cursor.arraysize)
@@ -1138,7 +1138,7 @@ Cursor objects
1138
1138
using the :meth: `execute ` method. For other statements, after
1139
1139
:meth: `executemany ` or :meth: `executescript `, or if the insertion failed,
1140
1140
the value of ``lastrowid `` is left unchanged. The initial value of
1141
- ``lastrowid `` is :const: ` None `.
1141
+ ``lastrowid `` is `` None ` `.
1142
1142
1143
1143
.. note ::
1144
1144
Inserts into ``WITHOUT ROWID `` tables are not recorded.
@@ -1155,7 +1155,7 @@ Cursor objects
1155
1155
1156
1156
Read-only attribute that provides the column names of the last query. To
1157
1157
remain compatible with the Python DB API, it returns a 7-tuple for each
1158
- column where the last six items of each tuple are :const: ` None `.
1158
+ column where the last six items of each tuple are `` None ` `.
1159
1159
1160
1160
It is set for ``SELECT `` statements without any matching rows as well.
1161
1161
@@ -1388,7 +1388,7 @@ The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`).
1388
1388
1389
1389
Exception raised in case a method or database API is not supported by the
1390
1390
underlying SQLite library. For example, setting *deterministic * to
1391
- :const: ` True ` in :meth: `~Connection.create_function `, if the underlying SQLite library
1391
+ `` True ` ` in :meth: `~Connection.create_function `, if the underlying SQLite library
1392
1392
does not support deterministic functions.
1393
1393
``NotSupportedError `` is a subclass of :exc: `DatabaseError `.
1394
1394
@@ -1406,7 +1406,7 @@ The following Python types can thus be sent to SQLite without any problem:
1406
1406
+-------------------------------+-------------+
1407
1407
| Python type | SQLite type |
1408
1408
+===============================+=============+
1409
- | :const: ` None ` | ``NULL `` |
1409
+ | `` None `` | ``NULL `` |
1410
1410
+-------------------------------+-------------+
1411
1411
| :class: `int ` | ``INTEGER `` |
1412
1412
+-------------------------------+-------------+
@@ -1423,7 +1423,7 @@ This is how SQLite types are converted to Python types by default:
1423
1423
+-------------+----------------------------------------------+
1424
1424
| SQLite type | Python type |
1425
1425
+=============+==============================================+
1426
- | ``NULL `` | :const: ` None ` |
1426
+ | ``NULL `` | `` None `` |
1427
1427
+-------------+----------------------------------------------+
1428
1428
| ``INTEGER `` | :class: `int ` |
1429
1429
+-------------+----------------------------------------------+
@@ -1736,7 +1736,7 @@ The ``sqlite3`` module does not adhere to the transaction handling recommended
1736
1736
by :pep: `249 `.
1737
1737
1738
1738
If the connection attribute :attr: `~Connection.isolation_level `
1739
- is not :const: ` None `,
1739
+ is not `` None ` `,
1740
1740
new transactions are implicitly opened before
1741
1741
:meth: `~Cursor.execute ` and :meth: `~Cursor.executemany ` executes
1742
1742
``INSERT ``, ``UPDATE ``, ``DELETE ``, or ``REPLACE `` statements.
@@ -1747,7 +1747,7 @@ that is, whether and what type of ``BEGIN`` statements ``sqlite3``
1747
1747
implicitly executes –
1748
1748
via the :attr: `~Connection.isolation_level ` attribute.
1749
1749
1750
- If :attr: `~Connection.isolation_level ` is set to :const: ` None `,
1750
+ If :attr: `~Connection.isolation_level ` is set to `` None ` `,
1751
1751
no transactions are implicitly opened at all.
1752
1752
This leaves the underlying SQLite library in `autocommit mode `_,
1753
1753
but also allows the user to perform their own transaction handling
0 commit comments