Title: [975] trunk/docs/contents/pg/query.rst: Add a note about dictresult() with duplicate fields
- Revision
- 975
- Author
- cito
- Date
- 2019-04-20 07:49:46 -0400 (Sat, 20 Apr 2019)
Log Message
Add a note about dictresult() with duplicate fields
Modified Paths
Diff
Modified: trunk/docs/contents/pg/query.rst (974 => 975)
--- trunk/docs/contents/pg/query.rst 2019-04-20 10:45:19 UTC (rev 974)
+++ trunk/docs/contents/pg/query.rst 2019-04-20 11:49:46 UTC (rev 975)
@@ -26,8 +26,8 @@
:meth:`Query.listfields`, :meth:`Query.fieldname`
and :meth:`Query.fieldnum` methods.
-Note that since PyGreSQL 5.0 this will return the values of array type
-columns as Python lists.
+Note that since PyGreSQL 5.0 this method will return the values of array
+type columns as Python lists.
dictresult -- get query values as list of dictionaries
------------------------------------------------------
@@ -44,9 +44,12 @@
This method returns query results as a list of dictionaries which have
the field names as keys.
-Note that since PyGreSQL 5.0 this will return the values of array type
-columns as Python lists.
+If the query has duplicate field names, you will get the value for the
+field with the highest index in the query.
+Note that since PyGreSQL 5.0 this method will return the values of array
+type columns as Python lists.
+
namedresult -- get query values as list of named tuples
-------------------------------------------------------
@@ -67,8 +70,8 @@
named tuples (particularly, names starting with an underscore) are
automatically renamed to valid positional names.
-Note that since PyGreSQL 5.0 this will return the values of array type
-columns as Python lists.
+Note that since PyGreSQL 5.0 this method will return the values of array
+type columns as Python lists.
.. versionadded:: 4.1
@@ -126,7 +129,7 @@
Return number of tuples in query object
:returns: number of tuples in :class:`Query`
- :rtype: int
- :raises TypeError: Too many arguments.
-
-This method returns the number of tuples in the query result.
+ :rtype: int
+ :raises TypeError: Too many arguments.
+
+This method returns the number of tuples in the query result.
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo/pygresql