Typecasters section in the extensions doc reordered.

This commit is contained in:
Daniele Varrazzo 2010-04-14 00:41:03 +01:00
parent d162c08cfa
commit 0ac4c8ac17

View File

@ -489,44 +489,53 @@ Python objects. All the typecasters are automatically registered, except
`register_type()` in order to receive Unicode objects instead of strings `register_type()` in order to receive Unicode objects instead of strings
from the database. See :ref:`unicode-handling` for details. from the database. See :ref:`unicode-handling` for details.
.. data:: BINARYARRAY .. data:: BOOLEAN
BOOLEAN
BOOLEANARRAY
DATE DATE
DECIMAL
FLOAT
INTEGER
INTERVAL
LONGINTEGER
TIME
UNICODE
Typecasters for basic types. Notice that a few other ones (`~psycopg2.BINARY`,
`~psycopg2.DATETIME`, `~psycopg2.NUMBER`, `~psycopg2.ROWID`,
`~psycopg2.STRING`) are exposed by the `psycopg2` module for |DBAPI|_
compliance.
.. data:: BINARYARRAY
BOOLEANARRAY
DATEARRAY DATEARRAY
DATETIMEARRAY DATETIMEARRAY
DECIMAL
DECIMALARRAY DECIMALARRAY
FLOAT
FLOATARRAY FLOATARRAY
INTEGER
INTEGERARRAY INTEGERARRAY
INTERVAL
INTERVALARRAY INTERVALARRAY
LONGINTEGER
LONGINTEGERARRAY LONGINTEGERARRAY
ROWIDARRAY ROWIDARRAY
STRINGARRAY STRINGARRAY
TIME
TIMEARRAY TIMEARRAY
UNICODE
UNICODEARRAY UNICODEARRAY
Typecasters to convert time-related data types to Python `!datetime` objects: Typecasters to convert arrays of sql types into Python lists.
.. data:: PYDATE .. data:: PYDATE
PYDATETIME PYDATETIME
PYINTERVAL PYINTERVAL
PYTIME PYTIME
Typecasters to convert time-related data types to `mx.DateTime`_ objects. Only Typecasters to convert time-related data types to Python `!datetime`
available if Psycopg was compiled with `!mx` support. objects.
.. data:: MXDATE .. data:: MXDATE
MXDATETIME MXDATETIME
MXINTERVAL MXINTERVAL
MXTIME MXTIME
Typecasters to convert time-related data types to `mx.DateTime`_ objects.
Only available if Psycopg was compiled with `!mx` support.
.. versionchanged:: 2.2.0 .. versionchanged:: 2.2.0
previously the `DECIMAL` typecaster and the specific time-related previously the `DECIMAL` typecaster and the specific time-related
typecasters (`!PY*` and `!MX*`) were not exposed by the `extensions` typecasters (`!PY*` and `!MX*`) were not exposed by the `extensions`