[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7827 - in trunk: gnue-common/src/datasources gnue-common/src/dat
From: |
reinhard |
Subject: |
[gnue] r7827 - in trunk: gnue-common/src/datasources gnue-common/src/datasources/drivers/Base gnue-forms/src/GFObjects |
Date: |
Fri, 12 Aug 2005 08:18:38 -0500 (CDT) |
Author: reinhard
Date: 2005-08-12 08:18:37 -0500 (Fri, 12 Aug 2005)
New Revision: 7827
Modified:
trunk/gnue-common/src/datasources/GDataSource.py
trunk/gnue-common/src/datasources/drivers/Base/RecordSet.py
trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py
trunk/gnue-forms/src/GFObjects/GFBlock.py
Log:
Change new parameter to be required; fix some docstrings.
Modified: trunk/gnue-common/src/datasources/GDataSource.py
===================================================================
--- trunk/gnue-common/src/datasources/GDataSource.py 2005-08-12 12:44:05 UTC
(rev 7826)
+++ trunk/gnue-common/src/datasources/GDataSource.py 2005-08-12 13:18:37 UTC
(rev 7827)
@@ -190,7 +190,7 @@
if self._connection._need_rollback_after_exception_:
raise Exceptions.FunctionNotAvailableError
self.postAll ()
- self.requeryAll (commit = False)
+ self.requeryAll (False)
# ---------------------------------------------------------------------------
@@ -208,7 +208,7 @@
raise Exceptions.FunctionNotAvailable
self.postAll ()
result = self.__currentResultSet.current.call (name, params)
- self.requeryAll (commit = False)
+ self.requeryAll (False)
return result
# ---------------------------------------------------------------------------
@@ -741,7 +741,7 @@
# Requery data from the backend
# ---------------------------------------------------------------------------
- def requeryAll (self, commit = True):
+ def requeryAll (self, commit):
"""
Requery data from the backend.
@@ -755,9 +755,9 @@
"""
if self.__master:
- self.__master.requeryAll (commit = commit)
+ self.__master.requeryAll (commit)
else:
- self.__currentResultSet.requery (commit = commit)
+ self.__currentResultSet.requery (commit)
# ---------------------------------------------------------------------------
Modified: trunk/gnue-common/src/datasources/drivers/Base/RecordSet.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/Base/RecordSet.py 2005-08-12
12:44:05 UTC (rev 7826)
+++ trunk/gnue-common/src/datasources/drivers/Base/RecordSet.py 2005-08-12
13:18:37 UTC (rev 7827)
@@ -477,8 +477,12 @@
def _needsRequery (self, commit):
"""
- Return True if this record has been successfully posted to the backend with
- L{_post}.
+ Return True if this record should be requeried.
+
+ Records are requeried after a post and after a commit.
+
+ @param commit: indicate whether the transaction in which the last post
+ happened has been committed.
"""
return (self.__requeryStatus == 'posted') \
or (self.__requeryStatus == 'commit' and commit)
Modified: trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py 2005-08-12
12:44:05 UTC (rev 7826)
+++ trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py 2005-08-12
13:18:37 UTC (rev 7827)
@@ -673,7 +673,7 @@
# Sync resultset with backend, and sync listeners with resultset
# ---------------------------------------------------------------------------
- def requery (self, commit = True):
+ def requery (self, commit):
"""
Synchronize everything after a call to L{post}.
@@ -681,6 +681,9 @@
operation should be committed, the L{Connection.commit} method can be
called between post and requery.
+ @param commit: indicate whether a commit was run since the last L{post}
+ call.
+
@raise Exception: if querying the records from the backend fails for any
reason. The exact exception classes depend on the backend.
"""
Modified: trunk/gnue-forms/src/GFObjects/GFBlock.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFBlock.py 2005-08-12 12:44:05 UTC (rev
7826)
+++ trunk/gnue-forms/src/GFObjects/GFBlock.py 2005-08-12 13:18:37 UTC (rev
7827)
@@ -543,7 +543,7 @@
# Synchronize backend -> resultset -> UI
if self._getMasterBlock () is None:
- self._dataSourceLink.requeryAll (commit = True)
+ self._dataSourceLink.requeryAll (True)
# Our recordCount might have changed if records were deleted
self._recordCount = self._resultSet.getRecordCount()
@@ -694,7 +694,7 @@
try:
self._dataSourceLink.postAll ()
res = self._resultSet.current.call (name, parameters)
- self._dataSourceLink.requeryAll (commit = False)
+ self._dataSourceLink.requeryAll (False)
finally:
self.switchRecord (0)
@@ -708,7 +708,7 @@
def updateCurrentRecordSet (self):
try:
self._dataSourceLink.postAll ()
- self._dataSourceLink.requeryAll (commit = False)
+ self._dataSourceLink.requeryAll (False)
finally:
self.switchRecord (0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7827 - in trunk: gnue-common/src/datasources gnue-common/src/datasources/drivers/Base gnue-forms/src/GFObjects,
reinhard <=