@@ -294,13 +294,13 @@ Module functions and constants
294
294
The :attr: `~Connection.isolation_level ` of the connection,
295
295
controlling whether and how transactions are implicitly opened.
296
296
Can be ``"DEFERRED" `` (default), ``"EXCLUSIVE" `` or ``"IMMEDIATE" ``;
297
- or :const: ` None ` to disable opening transactions implicitly.
297
+ or `` None ` ` to disable opening transactions implicitly.
298
298
See :ref: `sqlite3-controlling-transactions ` for more.
299
- :type isolation_level: str | :const: ` None `
299
+ :type isolation_level: str | None
300
300
301
301
:param check_same_thread:
302
- If :const: ` True ` (default), only the creating thread may use the connection.
303
- If :const: ` False `, the connection may be shared across multiple threads;
302
+ If `` True ` ` (default), only the creating thread may use the connection.
303
+ If `` False ` `, the connection may be shared across multiple threads;
304
304
if so, write operations should be serialized by the user to avoid data
305
305
corruption.
306
306
:type check_same_thread: bool
@@ -317,7 +317,7 @@ Module functions and constants
317
317
:type cached_statements: int
318
318
319
319
:param uri:
320
- If set to :const: ` True `, *database * is interpreted as a
320
+ If set to `` True ` `, *database * is interpreted as a
321
321
:abbr: `URI ( Uniform Resource Identifier ) ` with a file path
322
322
and an optional query string.
323
323
The scheme part *must * be ``"file:" ``,
@@ -366,7 +366,7 @@ Module functions and constants
366
366
367
367
.. function :: complete_statement(statement)
368
368
369
- Returns :const: ` True ` if the string *statement * contains one or more complete SQL
369
+ Returns `` True ` ` if the string *statement * contains one or more complete SQL
370
370
statements terminated by semicolons. It does not verify that the SQL is
371
371
syntactically correct, only that there are no unclosed string literals and the
372
372
statement is terminated by a semicolon.
@@ -383,7 +383,7 @@ Module functions and constants
383
383
By default you will not get any tracebacks in user-defined functions,
384
384
aggregates, converters, authorizer callbacks etc. If you want to debug them,
385
385
you can call this function with *flag * set to ``True ``. Afterwards, you will
386
- get tracebacks from callbacks on ``sys.stderr ``. Use :const: ` False ` to
386
+ get tracebacks from callbacks on ``sys.stderr ``. Use `` False ` ` to
387
387
disable the feature again.
388
388
389
389
@@ -410,7 +410,7 @@ Connection objects
410
410
411
411
This attribute controls the :ref: `transaction handling
412
412
<sqlite3-controlling-transactions>` performed by ``sqlite3 ``.
413
- If set to :const: ` None `, transactions are never implicitly opened.
413
+ If set to `` None ` `, transactions are never implicitly opened.
414
414
If set to one of ``"DEFERRED" ``, ``"IMMEDIATE" ``, or ``"EXCLUSIVE" ``,
415
415
corresponding to the underlying `SQLite transaction behaviour `_,
416
416
implicit :ref: `transaction management
@@ -424,8 +424,8 @@ Connection objects
424
424
This read-only attribute corresponds to the low-level SQLite
425
425
`autocommit mode `_.
426
426
427
- :const: ` True ` if a transaction is active (there are uncommitted changes),
428
- :const: ` False ` otherwise.
427
+ `` True ` ` if a transaction is active (there are uncommitted changes),
428
+ `` False ` ` otherwise.
429
429
430
430
.. versionadded :: 3.2
431
431
@@ -488,11 +488,11 @@ Connection objects
488
488
A callable that is called when the SQL function is invoked.
489
489
The callable must return :ref: `a type natively supported by SQLite
490
490
<sqlite3-types>`.
491
- Set to :const: ` None ` to remove an existing SQL function.
492
- :type func: :term: `callback ` | :const: ` None `
491
+ Set to `` None ` ` to remove an existing SQL function.
492
+ :type func: :term: `callback ` | None
493
493
494
494
:param deterministic:
495
- If :const: ` True `, the created SQL function is marked as
495
+ If `` True ` `, the created SQL function is marked as
496
496
`deterministic <https://sqlite.org/deterministic.html >`_,
497
497
which allows SQLite to perform additional optimizations.
498
498
:type deterministic: bool
@@ -531,8 +531,8 @@ Connection objects
531
531
The number of arguments that the ``step() `` method must accept
532
532
is controlled by *n_arg *.
533
533
534
- Set to :const: ` None ` to remove an existing SQL aggregate function.
535
- :type aggregate_class: :term: `class ` | :const: ` None `
534
+ Set to `` None ` ` to remove an existing SQL aggregate function.
535
+ :type aggregate_class: :term: `class ` | None
536
536
537
537
Example:
538
538
@@ -553,7 +553,7 @@ Connection objects
553
553
554
554
.. literalinclude :: ../includes/sqlite3/collation_reverse.py
555
555
556
- Remove a collation function by setting *callable * to :const: ` None `.
556
+ Remove a collation function by setting *callable * to `` None ` `.
557
557
558
558
559
559
.. method :: interrupt()
@@ -573,11 +573,11 @@ Connection objects
573
573
:mod: `sqlite3 ` module.
574
574
575
575
The first argument to the callback signifies what kind of operation is to be
576
- authorized. The second and third argument will be arguments or :const: ` None `
576
+ authorized. The second and third argument will be arguments or `` None ` `
577
577
depending on the first argument. The 4th argument is the name of the database
578
578
("main", "temp", etc.) if applicable. The 5th argument is the name of the
579
579
inner-most trigger or view that is responsible for the access attempt or
580
- :const: ` None ` if this access attempt is directly from input SQL code.
580
+ `` None ` ` if this access attempt is directly from input SQL code.
581
581
582
582
Please consult the SQLite documentation about the possible values for the first
583
583
argument and the meaning of the second and third argument depending on the first
@@ -592,7 +592,7 @@ Connection objects
592
592
a GUI.
593
593
594
594
If you want to clear any previously installed progress handler, call the
595
- method with :const: ` None ` for *progress_handler *.
595
+ method with `` None ` ` for *progress_handler *.
596
596
597
597
Returning a non-zero value from the handler function will terminate the
598
598
currently executing query and cause it to raise an :exc: `OperationalError `
@@ -612,7 +612,7 @@ Connection objects
612
612
sqlite3 module and the execution of triggers defined in the current
613
613
database.
614
614
615
- Passing :const: ` None ` as *trace_callback * will disable the trace callback.
615
+ Passing `` None ` ` as *trace_callback * will disable the trace callback.
616
616
617
617
.. note ::
618
618
Exceptions raised in the trace callback are not propagated. As a
@@ -626,7 +626,7 @@ Connection objects
626
626
.. method :: enable_load_extension(enabled, /)
627
627
628
628
Enable the SQLite engine to load SQLite extensions from shared libraries
629
- if *enabled * is :const: ` True `;
629
+ if *enabled * is `` True ` `;
630
630
else, disallow loading SQLite extensions.
631
631
SQLite extensions can define new functions,
632
632
aggregates or whole new virtual table implementations. One well-known
@@ -744,8 +744,8 @@ Connection objects
744
744
the *status * of the last iteration,
745
745
the *remaining * number of pages still to be copied,
746
746
and the *total * number of pages.
747
- Defaults to :const: ` None `.
748
- :type progress: :term: `callback ` | :const:` None`
747
+ Defaults to `` None ` `.
748
+ :type progress: :term: `callback ` | None
749
749
750
750
:param name:
751
751
The name of the database to back up.
@@ -825,7 +825,7 @@ Cursor objects
825
825
:meth: `executescript ` if you want to execute multiple SQL statements with one
826
826
call.
827
827
828
- If :attr: `~Connection.isolation_level ` is not :const: ` None `,
828
+ If :attr: `~Connection.isolation_level ` is not `` None ` `,
829
829
*sql * is an ``INSERT ``, ``UPDATE ``, ``DELETE ``, or ``REPLACE `` statement,
830
830
and there is no open transaction,
831
831
a transaction is implicitly opened before executing *sql *.
@@ -873,7 +873,7 @@ Cursor objects
873
873
.. method :: fetchone()
874
874
875
875
Fetch the next row of a query result set as a :class: `tuple `.
876
- Return :const: ` None ` if no more data is available.
876
+ Return `` None ` ` if no more data is available.
877
877
878
878
879
879
.. method :: fetchmany(size=cursor.arraysize)
@@ -929,7 +929,7 @@ Cursor objects
929
929
using the :meth: `execute ` method. For other statements, after
930
930
:meth: `executemany ` or :meth: `executescript `, or if the insertion failed,
931
931
the value of ``lastrowid `` is left unchanged. The initial value of
932
- ``lastrowid `` is :const: ` None `.
932
+ ``lastrowid `` is `` None ` `.
933
933
934
934
.. note ::
935
935
Inserts into ``WITHOUT ROWID `` tables are not recorded.
@@ -946,7 +946,7 @@ Cursor objects
946
946
947
947
Read-only attribute that provides the column names of the last query. To
948
948
remain compatible with the Python DB API, it returns a 7-tuple for each
949
- column where the last six items of each tuple are :const: ` None `.
949
+ column where the last six items of each tuple are `` None ` `.
950
950
951
951
It is set for ``SELECT `` statements without any matching rows as well.
952
952
@@ -1107,7 +1107,7 @@ The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`).
1107
1107
1108
1108
Exception raised in case a method or database API is not supported by the
1109
1109
underlying SQLite library. For example, setting *deterministic * to
1110
- :const: ` True ` in :meth: `~Connection.create_function `, if the underlying SQLite library
1110
+ `` True ` ` in :meth: `~Connection.create_function `, if the underlying SQLite library
1111
1111
does not support deterministic functions.
1112
1112
``NotSupportedError `` is a subclass of :exc: `DatabaseError `.
1113
1113
@@ -1125,7 +1125,7 @@ The following Python types can thus be sent to SQLite without any problem:
1125
1125
+-------------------------------+-------------+
1126
1126
| Python type | SQLite type |
1127
1127
+===============================+=============+
1128
- | :const: ` None ` | ``NULL `` |
1128
+ | `` None `` | ``NULL `` |
1129
1129
+-------------------------------+-------------+
1130
1130
| :class: `int ` | ``INTEGER `` |
1131
1131
+-------------------------------+-------------+
@@ -1142,7 +1142,7 @@ This is how SQLite types are converted to Python types by default:
1142
1142
+-------------+----------------------------------------------+
1143
1143
| SQLite type | Python type |
1144
1144
+=============+==============================================+
1145
- | ``NULL `` | :const: ` None ` |
1145
+ | ``NULL `` | `` None `` |
1146
1146
+-------------+----------------------------------------------+
1147
1147
| ``INTEGER `` | :class: `int ` |
1148
1148
+-------------+----------------------------------------------+
@@ -1428,7 +1428,7 @@ The ``sqlite3`` module does not adhere to the transaction handling recommended
1428
1428
by :pep: `249 `.
1429
1429
1430
1430
If the connection attribute :attr: `~Connection.isolation_level `
1431
- is not :const: ` None `,
1431
+ is not `` None ` `,
1432
1432
new transactions are implicitly opened before
1433
1433
:meth: `~Cursor.execute ` and :meth: `~Cursor.executemany ` executes
1434
1434
``INSERT ``, ``UPDATE ``, ``DELETE ``, or ``REPLACE `` statements.
@@ -1439,7 +1439,7 @@ that is, whether and what type of ``BEGIN`` statements ``sqlite3``
1439
1439
implicitly executes –
1440
1440
via the :attr: `~Connection.isolation_level ` attribute.
1441
1441
1442
- If :attr: `~Connection.isolation_level ` is set to :const: ` None `,
1442
+ If :attr: `~Connection.isolation_level ` is set to `` None ` `,
1443
1443
no transactions are implicitly opened at all.
1444
1444
This leaves the underlying SQLite library in `autocommit mode `_,
1445
1445
but also allows the user to perform their own transaction handling
0 commit comments