[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src GDataSource.py
From: |
Jason Cater |
Subject: |
gnue/common/src GDataSource.py |
Date: |
Sat, 28 Sep 2002 02:30:02 -0400 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/09/28 02:30:02
Modified files:
common/src : GDataSource.py
Log message:
added primarykey="" support to datasources to eliminate the
'entire-record-is-a-where-clause hack
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/src/GDataSource.py.diff?cvsroot=OldCVS&tr1=1.38&tr2=1.39&r1=text&r2=text
Patches:
Index: gnue/common/src/GDataSource.py
diff -c gnue/common/src/GDataSource.py:1.38 gnue/common/src/GDataSource.py:1.39
*** gnue/common/src/GDataSource.py:1.38 Sat Sep 28 02:10:45 2002
--- gnue/common/src/GDataSource.py Sat Sep 28 02:30:02 2002
***************
*** 131,137 ****
rset.callFunc(name,params)
else:
raise StandardError, \
! _("Backend doesn't support the trigger 'call' function")
#
# This method should be called after the object is created
# but before any other methods are called
--- 131,137 ----
rset.callFunc(name,params)
else:
raise StandardError, \
! _("Backend doesn't support the trigger 'call' function")
#
# This method should be called after the object is created
# but before any other methods are called
***************
*** 163,168 ****
--- 163,177 ----
dataObject._unboundFieldReferences = self._unboundFieldReferences
dataObject._defaultValues = self._defaultValues
dataObject._dataSource = self
+
+ # TODO: Short-term hack to allow primary key support
+ try:
+ dataObject._primaryIdField = self.primarykey
+ dataObject._primaryIdFormat = "%s = '%%s'" % self.primarykey
+ dataObject._primaryIdChecked = 1
+ except AttributeError:
+ pass
+
for child in self._children:
if isinstance(child, GConditions.GCondition):
dataObject._staticCondition = child
***************
*** 372,377 ****
--- 381,388 ----
'Typecast': GTypecast.text },
# TODO: Short-term hack
'explicitfields': {
+ 'Typecast': GTypecast.text },
+ 'primarykey': {
'Typecast': GTypecast.text } },
'ParentTags': None },
'staticset': {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/common/src GDataSource.py,
Jason Cater <=