mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 02:43:43 +03:00
Uniform usage of DB API spelling.
This commit is contained in:
parent
9955b2f32f
commit
3e66529864
|
@ -90,9 +90,9 @@ pygments_style = 'sphinx'
|
||||||
todo_include_todos = True
|
todo_include_todos = True
|
||||||
|
|
||||||
rst_epilog = """
|
rst_epilog = """
|
||||||
.. |DBAPI 2.0| replace:: `DBAPI 2.0`_
|
.. |DBAPI| replace:: DB API 2.0
|
||||||
|
|
||||||
.. _DBAPI 2.0: http://www.python.org/dev/peps/pep-0249/
|
.. _DBAPI: http://www.python.org/dev/peps/pep-0249/
|
||||||
|
|
||||||
.. _transaction isolation level:
|
.. _transaction isolation level:
|
||||||
http://www.postgresql.org/docs/8.4/static/transaction-iso.html
|
http://www.postgresql.org/docs/8.4/static/transaction-iso.html
|
||||||
|
|
|
@ -59,7 +59,7 @@ The ``connection`` class
|
||||||
selected: see :meth:`connection.set_isolation_level()`).
|
selected: see :meth:`connection.set_isolation_level()`).
|
||||||
|
|
||||||
|
|
||||||
The above methods are the only ones defined by the |DBAPI 2.0|_ protocol.
|
The above methods are the only ones defined by the |DBAPI|_ protocol.
|
||||||
The Psycopg connection objects exports the following additional methods
|
The Psycopg connection objects exports the following additional methods
|
||||||
and attributes.
|
and attributes.
|
||||||
|
|
||||||
|
|
|
@ -260,7 +260,7 @@ The ``cursor`` class
|
||||||
:exc:`ProgrammingError` is raised and the cursor position is not
|
:exc:`ProgrammingError` is raised and the cursor position is not
|
||||||
changed.
|
changed.
|
||||||
|
|
||||||
.. todo:: dbapi says should have been IndexError...
|
.. todo:: DB API says should have been IndexError...
|
||||||
|
|
||||||
The method can be used both for client-side cursors and server-side
|
The method can be used both for client-side cursors and server-side
|
||||||
(named) cursors.
|
(named) cursors.
|
||||||
|
@ -276,7 +276,7 @@ The ``cursor`` class
|
||||||
a single row at a time. It may also be used in the implementation of
|
a single row at a time. It may also be used in the implementation of
|
||||||
:meth:`executemany()`.
|
:meth:`executemany()`.
|
||||||
|
|
||||||
.. todo:: copied from dbapi: better specify what psycopg2 does with
|
.. todo:: copied from DB API: better specify what psycopg2 does with
|
||||||
arraysize
|
arraysize
|
||||||
|
|
||||||
.. attribute:: rowcount
|
.. attribute:: rowcount
|
||||||
|
@ -290,7 +290,7 @@ The ``cursor`` class
|
||||||
determined by the interface.
|
determined by the interface.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The |DBAPI 2.0|_ interface reserves to redefine the latter case to
|
The |DBAPI|_ interface reserves to redefine the latter case to
|
||||||
have the object return ``None`` instead of -1 in future versions
|
have the object return ``None`` instead of -1 in future versions
|
||||||
of the specification.
|
of the specification.
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
:mod:`psycopg2.extensions` -- Extensions to the DBAPI
|
:mod:`psycopg2.extensions` -- Extensions to the DB API
|
||||||
=====================================================
|
======================================================
|
||||||
|
|
||||||
.. sectionauthor:: Daniele Varrazzo <daniele.varrazzo@gmail.com>
|
.. sectionauthor:: Daniele Varrazzo <daniele.varrazzo@gmail.com>
|
||||||
|
|
||||||
.. module:: psycopg2.extensions
|
.. module:: psycopg2.extensions
|
||||||
|
|
||||||
The module contains a few objects and function extending the minimum set of
|
The module contains a few objects and function extending the minimum set of
|
||||||
functionalities defined by the |DBAPI 2.0|.
|
functionalities defined by the |DBAPI|.
|
||||||
|
|
||||||
|
|
||||||
.. class:: connection
|
.. class:: connection
|
||||||
|
|
|
@ -5,7 +5,7 @@ Psycopg -- PostgreSQL database adapter for Python
|
||||||
.. sectionauthor:: Daniele Varrazzo <daniele.varrazzo@gmail.com>
|
.. sectionauthor:: Daniele Varrazzo <daniele.varrazzo@gmail.com>
|
||||||
|
|
||||||
Psycopg is a PostgreSQL_ database adapter for the Python_ programming
|
Psycopg is a PostgreSQL_ database adapter for the Python_ programming
|
||||||
language. Its main advantages are that it supports the full Python |DBAPI 2.0|
|
language. Its main advantages are that it supports the full Python |DBAPI|_
|
||||||
and it is thread safe (threads can share the connections). It was designed for
|
and it is thread safe (threads can share the connections). It was designed for
|
||||||
heavily multi-threaded applications that create and destroy lots of cursors and
|
heavily multi-threaded applications that create and destroy lots of cursors and
|
||||||
make a conspicuous number of concurrent INSERTs or UPDATEs. The psycopg
|
make a conspicuous number of concurrent INSERTs or UPDATEs. The psycopg
|
||||||
|
|
|
@ -5,7 +5,7 @@ The :mod:`psycopg2` module content
|
||||||
|
|
||||||
.. module:: psycopg2
|
.. module:: psycopg2
|
||||||
|
|
||||||
The module interface respects the standard defined in the |DBAPI 2.0|.
|
The module interface respects the standard defined in the |DBAPI|_.
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
single: Connection string
|
single: Connection string
|
||||||
|
@ -68,7 +68,7 @@ The module interface respects the standard defined in the |DBAPI 2.0|.
|
||||||
Exceptions
|
Exceptions
|
||||||
----------
|
----------
|
||||||
|
|
||||||
In compliance with the |DBAPI 2.0|, the module makes informations about errors
|
In compliance with the |DBAPI|, the module makes informations about errors
|
||||||
available through the following exceptions:
|
available through the following exceptions:
|
||||||
|
|
||||||
.. todo::
|
.. todo::
|
||||||
|
@ -168,9 +168,9 @@ This is the exception inheritance layout:
|
||||||
Type Objects and Constructors
|
Type Objects and Constructors
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
.. note:: This section is mostly copied verbatim from the |DBAPI 2.0|_
|
.. note:: This section is mostly copied verbatim from the |DBAPI|_
|
||||||
specification. While these objects are exposed in compliance to the
|
specification. While these objects are exposed in compliance to the
|
||||||
DBAPI, Psycopg offers very accurate tools to convert data between Python
|
DB API, Psycopg offers very accurate tools to convert data between Python
|
||||||
and PostgreSQL formats. See :ref:`adapting-new-types` and
|
and PostgreSQL formats. See :ref:`adapting-new-types` and
|
||||||
:ref:`type-casting-from-sql-to-python`
|
:ref:`type-casting-from-sql-to-python`
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ Basic module usage
|
||||||
pair: Example; Usage
|
pair: Example; Usage
|
||||||
|
|
||||||
The basic Psycopg usage is common to all the database adapters implementing
|
The basic Psycopg usage is common to all the database adapters implementing
|
||||||
the |DBAPI 2.0| protocol. Here is an interactive session showing some of the
|
the |DBAPI|_ protocol. Here is an interactive session showing some of the
|
||||||
basic commands::
|
basic commands::
|
||||||
|
|
||||||
>>> import psycopg2
|
>>> import psycopg2
|
||||||
|
@ -326,7 +326,7 @@ Thread safety
|
||||||
The Psycopg module is *thread-safe*: threads can access the same database
|
The Psycopg module is *thread-safe*: threads can access the same database
|
||||||
using separate session (by creating a :class:`connection` per thread) or using
|
using separate session (by creating a :class:`connection` per thread) or using
|
||||||
the same session (accessing to the same connection and creating separate
|
the same session (accessing to the same connection and creating separate
|
||||||
:class:`cursor`\ s). In |DBAPI 2.0|_ parlance, Psycopg is *level 2 thread safe*.
|
:class:`cursor`\ s). In |DBAPI|_ parlance, Psycopg is *level 2 thread safe*.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user