Author: cito
Date: Tue Jan 12 16:21:46 2016
New Revision: 728
Log:
Minor doc fixes
Modified:
branches/4.x/docs/contents/pg/db_wrapper.rst
branches/4.x/pg.py
Modified: branches/4.x/docs/contents/pg/db_wrapper.rst
==============================================================================
--- branches/4.x/docs/contents/pg/db_wrapper.rst Tue Jan 12 11:57:21
2016 (r727)
+++ branches/4.x/docs/contents/pg/db_wrapper.rst Tue Jan 12 16:21:46
2016 (r728)
@@ -63,10 +63,12 @@
:param str table: name of table
:returns: Name of the field which is the primary key of the table
:rtype: str
+ :rtype: str
+ :raises KeyError: the table does not have a primary key
This method returns the primary key of a table. For composite primary
-keys, the return value will be a frozenset. Note that this raises an
-exception if the table does not have a primary key.
+keys, the return value will be a frozenset. Note that this raises a
+KeyError if the table does not have a primary key.
get_databases -- get list of databases in the system
----------------------------------------------------
Modified: branches/4.x/pg.py
==============================================================================
--- branches/4.x/pg.py Tue Jan 12 11:57:21 2016 (r727)
+++ branches/4.x/pg.py Tue Jan 12 16:21:46 2016 (r728)
@@ -554,7 +554,7 @@
"""This method gets or sets the primary key of a class.
Composite primary keys are represented as frozensets. Note that
- this raises an exception if the table does not have a primary key.
+ this raises a KeyError if the table does not have a primary key.
If newpkey is set and is not a dictionary then set that
value as the primary key of the class. If it is a dictionary
@@ -743,7 +743,7 @@
# build qualified class name
qcl = self._add_schema(cl)
# To allow users to work with multiple tables,
- # we munge the name of the "oid" the key
+ # we munge the name of the "oid" key
qoid = _oid_key(qcl)
if not keyname:
# use the primary key by default
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql