Skip to content

Commit 5eb1abc

Browse files
Reframe How-To section headers in terms of how-to per Diataxis
Co-authored-by: Erlend E. Aasland <[email protected]>
1 parent 8dc6231 commit 5eb1abc

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Doc/library/sqlite3.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,8 +1620,8 @@ both styles:
16201620

16211621
.. _sqlite3-adapters:
16221622

1623-
Using adapters to store custom Python types in SQLite databases
1624-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1623+
How to adapt custom Python types to SQLite values
1624+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16251625

16261626
SQLite supports only a limited set of data types natively.
16271627
To store custom Python types in SQLite databases, *adapt* them to one of the
@@ -1638,8 +1638,8 @@ registering custom adapter functions.
16381638

16391639
.. _sqlite3-conform:
16401640

1641-
Letting your object adapt itself
1642-
""""""""""""""""""""""""""""""""
1641+
Let your object adapt itself
1642+
""""""""""""""""""""""""""""
16431643

16441644
Suppose we have a :class:`!Point` class that represents a pair of coordinates,
16451645
``x`` and ``y``, in a Cartesian coordinate system.
@@ -1652,8 +1652,8 @@ The object passed to *protocol* will be of type :class:`PrepareProtocol`.
16521652
.. literalinclude:: ../includes/sqlite3/adapter_point_1.py
16531653

16541654

1655-
Registering an adapter callable
1656-
"""""""""""""""""""""""""""""""
1655+
Register an adapter callable
1656+
""""""""""""""""""""""""""""
16571657

16581658
The other possibility is to create a function that converts the Python object
16591659
to an SQLite-compatible type.
@@ -1664,8 +1664,8 @@ This function can then be registered using :func:`register_adapter`.
16641664

16651665
.. _sqlite3-converters:
16661666

1667-
Converting SQLite values to custom Python types
1668-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1667+
How to convert SQLite values to custom Python types
1668+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16691669

16701670
Writing an adapter lets you convert *from* custom Python types *to* SQLite
16711671
values.
@@ -1751,8 +1751,8 @@ This section shows recipes for common adapters and converters.
17511751
17521752
.. _sqlite3-connection-shortcuts:
17531753

1754-
Using connection shortcut methods
1755-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1754+
How to use connection shortcut methods
1755+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17561756

17571757
Using the :meth:`~Connection.execute`,
17581758
:meth:`~Connection.executemany`, and :meth:`~Connection.executescript`
@@ -1768,8 +1768,8 @@ directly using only a single call on the :class:`Connection` object.
17681768

17691769
.. _sqlite3-columns-by-name:
17701770

1771-
Accessing columns by name instead of by index
1772-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1771+
Hwo to access columns by name
1772+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17731773

17741774
One useful feature of the :mod:`!sqlite3` module is the built-in
17751775
:class:`sqlite3.Row` class designed to be used as a row factory.
@@ -1782,8 +1782,8 @@ case-insensitively by name:
17821782

17831783
.. _sqlite3-connection-context-manager:
17841784

1785-
Using the connection as a context manager
1786-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1785+
How to use a connection as a context manager
1786+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17871787

17881788
A :class:`Connection` object can be used as a context manager that
17891789
automatically commits or rolls back open transactions when leaving the body of
@@ -1807,8 +1807,8 @@ the context manager is a no-op.
18071807

18081808
.. _sqlite3-uri-tricks:
18091809

1810-
Working with SQLite URIs
1811-
^^^^^^^^^^^^^^^^^^^^^^^^
1810+
How to work with SQLite URIs
1811+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18121812

18131813
Some useful URI tricks include:
18141814

0 commit comments

Comments
 (0)