[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7780 - trunk/gnue-common/src/datasources/drivers/Base
From: |
reinhard |
Subject: |
[gnue] r7780 - trunk/gnue-common/src/datasources/drivers/Base |
Date: |
Thu, 4 Aug 2005 10:29:31 -0500 (CDT) |
Author: reinhard
Date: 2005-08-04 10:29:30 -0500 (Thu, 04 Aug 2005)
New Revision: 7780
Modified:
trunk/gnue-common/src/datasources/drivers/Base/RecordSet.py
Log:
Type checks, docstrings.
Modified: trunk/gnue-common/src/datasources/drivers/Base/RecordSet.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/Base/RecordSet.py 2005-08-04
15:21:40 UTC (rev 7779)
+++ trunk/gnue-common/src/datasources/drivers/Base/RecordSet.py 2005-08-04
15:29:30 UTC (rev 7780)
@@ -25,6 +25,8 @@
RecordSet class used by all database driver plugins.
"""
+__all__ = ['RecordSet']
+
from gnue.common.datasources import Exceptions
@@ -235,7 +237,7 @@
@param fieldname: Field name.
@param value: Value to set.
- @raise: L{Exceptions.ReadOnlyModifyError}
+ @raise L{Exceptions.ReadOnlyModifyError}: if the RecordSet is read only.
"""
if fieldname in self.__boundFields and self.__readonly:
raise Exceptions.ReadOnlyModifyError
@@ -292,8 +294,9 @@
@param updateDict: dictionary with the keys being the field names and the
values being the new values for the fields.
- @raise: L{Exceptions.ReadOnlyModifyError}
+ @raise L{Exceptions.ReadOnlyModifyError}: if the RecordSet is read only.
"""
+ checktype (updateDict, dict)
for (fieldname, value) in updateDict.items ():
self [fieldname] = value
@@ -331,6 +334,9 @@
@param fieldname: Field name.
@return: True if the field has local modifications, False otherwise.
"""
+
+ checktype (fieldname, basestring)
+
return self.__modifiedFlags.has_key (fieldname)
@@ -345,7 +351,7 @@
The actual deletion occurs on the next call to the L{_post} method (to be
called via L{ResultSet.post}).
- @raise: L{Exceptions.ReadOnlyDeleteError}
+ @raise L{Exceptions.ReadOnlyDeleteError}: if the RecordSet is read only.
"""
if self.__readonly:
@@ -378,10 +384,14 @@
@param parameters: Dictionary with parametername/value pairs.
@return: Return value of the function that was called.
- @raise: L{Exceptions.FunctionCallOnEmptyRecordError}, whatever the called
- function raises
+ @raise L{Exceptions.FunctionCallOnEmptyRecordError}: if the record is
+ empty.
+ @raise Exception: whatever the called function raises
"""
+ checktype (methodname, basestring)
+ checktype (parameters, dict)
+
if self.isEmpty ():
raise Exceptions.FunctionCallOnEmptyRecordError
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7780 - trunk/gnue-common/src/datasources/drivers/Base,
reinhard <=