Added note about the adapted attribute in the module-level wrappers

Specifying it otherwise people expects the wrappers to have full datetime
semantics: see ticket #136.
This commit is contained in:
Daniele Varrazzo 2012-10-27 22:24:48 +01:00
parent e109024d39
commit 10476200fd

View File

@ -258,15 +258,15 @@ the type codes for date, time and timestamp columns; see the
Implementation Hints below for details). Implementation Hints below for details).
The module exports the following constructors and singletons: The module exports the following constructors and singletons:
.. function:: Date(year,month,day) .. function:: Date(year,month,day)
This function constructs an object holding a date value. This function constructs an object holding a date value.
.. function:: Time(hour,minute,second) .. function:: Time(hour,minute,second)
This function constructs an object holding a time value. This function constructs an object holding a time value.
.. function:: Timestamp(year,month,day,hour,minute,second) .. function:: Timestamp(year,month,day,hour,minute,second)
This function constructs an object holding a time stamp value. This function constructs an object holding a time stamp value.
@ -278,11 +278,11 @@ The module exports the following constructors and singletons:
the standard Python time module for details). the standard Python time module for details).
.. function:: TimeFromTicks(ticks) .. function:: TimeFromTicks(ticks)
This function constructs an object holding a time value from the given This function constructs an object holding a time value from the given
ticks value (number of seconds since the epoch; see the documentation of ticks value (number of seconds since the epoch; see the documentation of
the standard Python time module for details). the standard Python time module for details).
.. function:: TimestampFromTicks(ticks) .. function:: TimestampFromTicks(ticks)
This function constructs an object holding a time stamp value from the This function constructs an object holding a time stamp value from the
@ -290,10 +290,16 @@ The module exports the following constructors and singletons:
documentation of the standard Python time module for details). documentation of the standard Python time module for details).
.. function:: Binary(string) .. function:: Binary(string)
This function constructs an object capable of holding a binary (long) This function constructs an object capable of holding a binary (long)
string value. string value.
.. note::
All the adapters returned by the module level factories (`!Binary`,
`!Date`, `!Time`, `!Timestamp` and the `!*FromTicks` variants) expose the
wrapped object (a regular Python object such as `!datetime`) in an
`!adapted` attribute.
.. data:: STRING .. data:: STRING
@ -304,17 +310,17 @@ The module exports the following constructors and singletons:
This type object is used to describe (long) binary columns in a database This type object is used to describe (long) binary columns in a database
(e.g. LONG, RAW, BLOBs). (e.g. LONG, RAW, BLOBs).
.. data:: NUMBER .. data:: NUMBER
This type object is used to describe numeric columns in a database. This type object is used to describe numeric columns in a database.
.. data:: DATETIME .. data:: DATETIME
This type object is used to describe date/time columns in a database. This type object is used to describe date/time columns in a database.
.. data:: ROWID .. data:: ROWID
This type object is used to describe the "Row ID" column in a database. This type object is used to describe the "Row ID" column in a database.