Author: cito
Date: Wed Jan 13 17:07:36 2016
New Revision: 736
Log:
Back port minor changes in the docs from trunk to 4.x
Modified:
branches/4.x/docs/contents/pg/connection.rst
branches/4.x/docs/contents/pg/db_wrapper.rst
branches/4.x/pg.py
Modified: branches/4.x/docs/contents/pg/connection.rst
==============================================================================
--- branches/4.x/docs/contents/pg/connection.rst Wed Jan 13 16:49:35
2016 (r735)
+++ branches/4.x/docs/contents/pg/connection.rst Wed Jan 13 17:07:36
2016 (r736)
@@ -168,9 +168,8 @@
of tuples/lists that define the values for each inserted row. The rows
values may contain string, integer, long or double (real) values.
-.. note::
+.. warning::
- **Be very careful**:
This method doesn't type check the fields according to the table definition;
it just look whether or not it knows how to handle such types.
Modified: branches/4.x/docs/contents/pg/db_wrapper.rst
==============================================================================
--- branches/4.x/docs/contents/pg/db_wrapper.rst Wed Jan 13 16:49:35
2016 (r735)
+++ branches/4.x/docs/contents/pg/db_wrapper.rst Wed Jan 13 17:07:36
2016 (r736)
@@ -218,6 +218,7 @@
:param str keyname: name of field to use as key (optional)
:returns: A dictionary - the keys are the attribute names,
the values are the row values.
+ :raises ProgrammingError: no primary key or missing privilege
This method is the basic mechanism to get a single row. It assumes
that the key specifies a unique row. If *keyname* is not specified,
@@ -232,14 +233,15 @@
insert -- insert a row into a database table
--------------------------------------------
-.. method:: DB.insert(table, [d,] [key = val, ...])
+.. method:: DB.insert(table, [d], [col=val, ...])
Insert a row into a database table
:param str table: name of table
:param dict d: optional dictionary of values
- :returns: the inserted values
+ :returns: the inserted values in the database
:rtype: dict
+ :raises ProgrammingError: missing privilege or conflict
This method inserts a row into a table. If the optional dictionary is
not supplied then the required values must be included as keyword/value
@@ -255,14 +257,15 @@
update -- update a row in a database table
------------------------------------------
-.. method:: DB.update(table, [d,] [key = val, ...])
+.. method:: DB.update(table, [d], [col=val, ...])
Update a row in a database table
:param str table: name of table
:param dict d: optional dictionary of values
- :returns: the new row
+ :returns: the new row in the database
:rtype: dict
+ :raises ProgrammingError: no primary key or missing privilege
Similar to insert but updates an existing row. The update is based on the
OID value as munged by get or passed as keyword, or on the primary key of
Modified: branches/4.x/pg.py
==============================================================================
--- branches/4.x/pg.py Wed Jan 13 16:49:35 2016 (r735)
+++ branches/4.x/pg.py Wed Jan 13 17:07:36 2016 (r736)
@@ -842,9 +842,9 @@
default values, etc.
"""
- # Update always works on the oid which get returns if available,
+ # Update always works on the oid which get() returns if available,
# otherwise use the primary key. Fail if neither.
- # Note that we only accept oid key from named args for safety
+ # Note that we only accept oid key from named args for safety.
qcl = self._add_schema(cl)
qoid = _oid_key(qcl)
if 'oid' in kw:
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql