Skip to content

Commit 896053b

Browse files
gh-94635: Normalise sqlite3 doc headings
1 parent fb6dcca commit 896053b

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

Doc/library/sqlite3.rst

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ both styles:
115115

116116
.. _sqlite3-module-contents:
117117

118-
Module functions and constants
118+
Module Functions and Constants
119119
------------------------------
120120

121121

@@ -1241,7 +1241,7 @@ The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`).
12411241

12421242
.. _sqlite3-types:
12431243

1244-
SQLite and Python types
1244+
SQLite and Python Types
12451245
-----------------------
12461246

12471247

@@ -1291,8 +1291,8 @@ you can let the :mod:`sqlite3` module convert SQLite types to different Python
12911291
types via converters.
12921292

12931293

1294-
Using adapters to store custom Python types in SQLite databases
1295-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1294+
How to Adapt Custom Python Types to SQLite Values
1295+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12961296

12971297
SQLite supports only a limited set of data types natively.
12981298
To store custom Python types in SQLite databases, *adapt* them to one of the
@@ -1309,8 +1309,8 @@ registering custom adapter functions.
13091309

13101310
.. _sqlite3-conform:
13111311

1312-
Letting your object adapt itself
1313-
""""""""""""""""""""""""""""""""
1312+
Let your object adapt itself
1313+
""""""""""""""""""""""""""""
13141314

13151315
Suppose we have a ``Point`` class that represents a pair of coordinates,
13161316
``x`` and ``y``, in a Cartesian coordinate system.
@@ -1323,8 +1323,8 @@ The object passed to *protocol* will be of type :class:`PrepareProtocol`.
13231323
.. literalinclude:: ../includes/sqlite3/adapter_point_1.py
13241324

13251325

1326-
Registering an adapter callable
1327-
"""""""""""""""""""""""""""""""
1326+
Use an adapter callable
1327+
"""""""""""""""""""""""
13281328

13291329
The other possibility is to create a function that converts the Python object
13301330
to an SQLite-compatible type.
@@ -1333,8 +1333,8 @@ This function can then be registered using :func:`register_adapter`.
13331333
.. literalinclude:: ../includes/sqlite3/adapter_point_2.py
13341334

13351335

1336-
Converting SQLite values to custom Python types
1337-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1336+
How to Convert SQLite Values to Custom Python Types
1337+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13381338

13391339
Writing an adapter lets you convert *from* custom Python types *to* SQLite
13401340
values.
@@ -1373,7 +1373,7 @@ The following example illustrates the implicit and explicit approaches:
13731373
.. literalinclude:: ../includes/sqlite3/converter_point.py
13741374

13751375

1376-
Default adapters and converters
1376+
Default Adapters and Converters
13771377
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13781378

13791379
There are default adapters for the date and datetime types in the datetime
@@ -1450,8 +1450,8 @@ This section shows recipes for common adapters and converters.
14501450
14511451
.. _sqlite3-controlling-transactions:
14521452

1453-
Controlling Transactions
1454-
------------------------
1453+
Transaction Control
1454+
-------------------
14551455

14561456
The ``sqlite3`` module does not adhere to the transaction handling recommended
14571457
by :pep:`249`.
@@ -1493,7 +1493,7 @@ regardless of the value of :attr:`~Connection.isolation_level`.
14931493

14941494
.. _sqlite3-uri-tricks:
14951495

1496-
SQLite URI tricks
1496+
SQLite URI Tricks
14971497
-----------------
14981498

14991499
Some useful URI tricks include:
@@ -1521,12 +1521,13 @@ can be found in the `SQLite URI documentation`_.
15211521

15221522
.. _SQLite URI documentation: https://www.sqlite.org/uri.html
15231523

1524-
Using :mod:`sqlite3` efficiently
1525-
--------------------------------
15261524

1525+
How to Use ``sqlite3`` Efficiently
1526+
----------------------------------
15271527

1528-
Using shortcut methods
1529-
^^^^^^^^^^^^^^^^^^^^^^
1528+
1529+
How to Use Shortcut Methods
1530+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
15301531

15311532
Using the nonstandard :meth:`execute`, :meth:`executemany` and
15321533
:meth:`executescript` methods of the :class:`Connection` object, your code can
@@ -1539,8 +1540,8 @@ directly using only a single call on the :class:`Connection` object.
15391540
.. literalinclude:: ../includes/sqlite3/shortcut_methods.py
15401541

15411542

1542-
Accessing columns by name instead of by index
1543-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1543+
How to Access Columns by Name
1544+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15441545

15451546
One useful feature of the :mod:`sqlite3` module is the built-in
15461547
:class:`sqlite3.Row` class designed to be used as a row factory.
@@ -1553,8 +1554,8 @@ case-insensitively by name:
15531554

15541555
.. _sqlite3-connection-context-manager:
15551556

1556-
Using the connection as a context manager
1557-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1557+
How to Use a Connection as a Context Manager
1558+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15581559

15591560
A :class:`Connection` object can be used as a context manager that
15601561
automatically commits or rolls back open transactions when leaving the body of

0 commit comments

Comments
 (0)