summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2012-10-27 22:24:48 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2012-10-27 22:24:48 +0100
commit10476200fdb88fbb3a90cbcae97a91cafecd637f (patch)
treefa467f13ae780b004c688ad157de92538e10c9c9
parente109024d39c1fb76139c39f4a467f5e39f499260 (diff)
downloadpsycopg2-10476200fdb88fbb3a90cbcae97a91cafecd637f.tar.gz
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.
-rw-r--r--doc/src/module.rst28
1 files changed, 17 insertions, 11 deletions
diff --git a/doc/src/module.rst b/doc/src/module.rst
index 35292ba..eff4670 100644
--- a/doc/src/module.rst
+++ b/doc/src/module.rst
@@ -258,15 +258,15 @@ the type codes for date, time and timestamp columns; see the
Implementation Hints below for details).
The module exports the following constructors and singletons:
-
+
.. function:: Date(year,month,day)
This function constructs an object holding a date value.
-
+
.. function:: Time(hour,minute,second)
This function constructs an object holding a time value.
-
+
.. function:: Timestamp(year,month,day,hour,minute,second)
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).
.. function:: TimeFromTicks(ticks)
-
+
This function constructs an object holding a time value from the given
ticks value (number of seconds since the epoch; see the documentation of
the standard Python time module for details).
-
+
.. function:: TimestampFromTicks(ticks)
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).
.. function:: Binary(string)
-
+
This function constructs an object capable of holding a binary (long)
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
@@ -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
(e.g. LONG, RAW, BLOBs).
-
+
.. data:: NUMBER
This type object is used to describe numeric columns in a database.
.. data:: DATETIME
-
+
This type object is used to describe date/time columns in a database.
-
+
.. data:: ROWID
-
+
This type object is used to describe the "Row ID" column in a database.