commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/gnue-common doc/DataObjects.txt src/GDataO...


From: Jason Cater
Subject: gnue/gnue-common doc/DataObjects.txt src/GDataO...
Date: Fri, 20 Jul 2001 12:21:06 -0700

CVSROOT:        /home/cvs
Module name:    gnue
Branch:         gnuef-new-datasources
Changes by:     Jason Cater <address@hidden>    01/07/20 12:21:06

Modified files:
        gnue-common/doc: DataObjects.txt 
        gnue-common/src: GDataObjects.py 

Log message:
        changed ResultSet.getRecord to getRecordNumber; made getRecord return a 
specified recordset; fixed setRecord to work properly; misc bug fixes

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/doc/DataObjects.txt.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.3.2.1&tr2=1.3.2.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/GDataObjects.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.7.2.8&tr2=1.7.2.9&r1=text&r2=text

Patches:
Index: gnue/gnue-common/doc/DataObjects.txt
diff -u gnue/gnue-common/doc/DataObjects.txt:1.2 
gnue/gnue-common/doc/DataObjects.txt:1.3
--- gnue/gnue-common/doc/DataObjects.txt:1.2    Tue Jul 17 12:06:19 2001
+++ gnue/gnue-common/doc/DataObjects.txt        Tue Jul 17 12:10:54 2001
@@ -3,6 +3,8 @@
 GRD for forms and reports, respectively). The DataSource object acts as
 a implementation buffer between vendor-specific DataObjects and vendor-
 neutral datasource tags (explained further in the DataObject discussion).
+In other words, a vendor-specific DataObject will be bound to the 
+DataSource after the DataSource is initialized.
 
 A DataObject is the highest level object in the Database Driver hierarchy. 
 It basically maintains state information such as the database connection,
@@ -39,24 +41,28 @@
 
 ***********
 DataSource: 
-  getDataSet(): 
-  
-  addDetailDataSource() : Adds a DataSource in a master/detail relationship
-  masterRecordChanged() : Called when master in master/detail is updated
+  initialize()
+    Called to initialize the datasource. Binds the 
+    DataSource to a DataObject.
+
+  getDataObject()
+    Returns the bound DataObject
+
+  referenceField(field)
+    Used by the client app to notify that a certain field is being 
+    referenced.  This will ensure that the DataObject includes this
+    field in its query.
 
-  commit()      : 
-  rollback()    : 
 
-
 ***********
 DataObject:
-  createResultSet(self, conditions={}, readOnly=0): 
+  createResultSet(conditions={}, readOnly=0): 
     Creates and returns a resultset satisfying "conditions". conditions
     can either be a dictionary/hash of fieldname:value AND pairs, or, for
     more complex conditions, a GConditions object.
 
 
-  addDetailDataObject(self, dataObject, handler=None): 
+  addDetailDataObject(dataObject, handler=None): 
     Add a detail data object.  This dataobject will create a new resultset 
     everything this dataobject changes (new record, etc).  The optional 
     handler will be called after the detail dataobject is notified.  The 
Index: gnue/gnue-common/src/GDataObjects.py
diff -u gnue/gnue-common/src/GDataObjects.py:1.6 
gnue/gnue-common/src/GDataObjects.py:1.7
--- gnue/gnue-common/src/GDataObjects.py:1.6    Tue May 29 19:54:11 2001
+++ gnue/gnue-common/src/GDataObjects.py        Tue Jun  5 08:57:45 2001
@@ -127,8 +127,8 @@
     criteria = {}
     for i in range(0, len(self._masterfields)): 
       GDebug.printMesg(10,"Adding criteria")
-      criteria[string.trim(self._detailfields[i])] = \
-          master.current.getField(string.trim(self._masterfields[i]))
+      criteria[string.strip(self._detailfields[i])] = \
+          master.current.getField(string.strip(self._masterfields[i]))
       GDebug.printMesg(10,master.current.getField(self._masterfields[i]))
     return self.createResultSet(criteria)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]