]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Fixed links in error docs, uniform DB-API spelling
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 1 Dec 2020 03:29:38 +0000 (03:29 +0000)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 1 Dec 2020 03:29:38 +0000 (03:29 +0000)
docs/errors.rst
docs/index.rst
docs/usage.rst

index 3c6d8821a995e326d18898155ab5468f4f5fa256..80a3caec37f218b0c007e1b291b3dfc6aa87d69d 100644 (file)
@@ -52,12 +52,14 @@ This module exposes objects to represent and examine database errors.
 
 
 .. index::
-    single: Exceptions; DB API
+    single: Exceptions; DB-API
 
-DBAPI exceptions
-----------------
+.. _dbapi-exceptions:
 
-In compliance with the DB API, all the exceptions raised by ``psycopg3``
+DB-API exceptions
+-----------------
+
+In compliance with the DB-API, all the exceptions raised by ``psycopg3``
 derive from the following classes:
 
 .. parsed-literal::
@@ -90,12 +92,15 @@ These classes are also exposed by the ``psycopg3`` module.
 .. index::
     single: Exceptions; PostgreSQL
 
+.. _sqlstate-exceptions:
+
 SQLSTATE exceptions
 -------------------
 
 Errors coming from a database server (as opposite as ones generated
 client-side, such as connection failed) usually have a 5-letters error code
-called SQLSTATE (available in the ``diag.sqlstate`` attribute).
+called SQLSTATE (available in the `~Diagnostic.sqlstate` attribute of
+`Error.diag`).
 
 ``psycopg3`` exposes a different class for each SQLSTATE value, allowing to
 write idiomatic error handling code according to specific conditions happening
@@ -119,7 +124,7 @@ refer to the table below for all the classes defined.
 .. __: https://www.postgresql.org/docs/current/errcodes-appendix.html#ERRCODES-TABLE
 
 Every exception class is a subclass of one of the :ref:`standard DB-API
-exception <dbapi-exceptions>` and expose the `~Error` interface.
+exception <dbapi-exceptions>` and expose the `Error` interface.
 
 
 .. autofunction:: lookup
index 9b460abe23220781503c273873766e6e3fb211dc..b3eabb42cf01de2a58435e858b471aed979a7846 100644 (file)
@@ -6,7 +6,7 @@ Psycopg 3 -- PostgreSQL database adapter for Python
 programming language.
 
 `!psycopg3` presents a familiar interface for everyone who has used
-`!psycopg2` or any other `DB API 2.0`__ database adapter, but allows to use
+`!psycopg2` or any other `DB-API 2.0`__ database adapter, but allows to use
 more modern PostgreSQL and Python features, such as:
 
 - Strict Strong Typing
index d69e4d6bcd49d1963013d4541ed066b4793682c7..ede4a39c8aa16dc3022345f7bc1e394ba1045e12 100644 (file)
@@ -4,7 +4,7 @@ Basic module usage
 ==================
 
 The basic Psycopg usage is common to all the database adapters implementing
-the `DB API`__ protocol. Other database adapters, such as the builtin
+the `DB-API`__ protocol. Other database adapters, such as the builtin
 `sqlite3` or `psycopg2`, have roughly the same pattern of interaction.