[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7242 - trunk/gnue-common/src/datasources/drivers/appserver/appse
From: |
reinhard |
Subject: |
[gnue] r7242 - trunk/gnue-common/src/datasources/drivers/appserver/appserver |
Date: |
Mon, 21 Mar 2005 09:53:36 -0600 (CST) |
Author: reinhard
Date: 2005-03-21 09:53:35 -0600 (Mon, 21 Mar 2005)
New Revision: 7242
Modified:
trunk/gnue-common/src/datasources/drivers/appserver/appserver/Connection.py
trunk/gnue-common/src/datasources/drivers/appserver/appserver/ResultSet.py
Log:
Use gnue_id as fixed primary key name. Be more consistent on using unicode in
field names.
Modified:
trunk/gnue-common/src/datasources/drivers/appserver/appserver/Connection.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/appserver/appserver/Connection.py
2005-03-21 15:52:28 UTC (rev 7241)
+++ trunk/gnue-common/src/datasources/drivers/appserver/appserver/Connection.py
2005-03-21 15:53:35 UTC (rev 7242)
@@ -46,7 +46,9 @@
supportedDataObjects = {'object': DataObject.DataObject}
+ _primarykeyFields = [u'gnue_id']
+
# ---------------------------------------------------------------------------
# Constructor
# ---------------------------------------------------------------------------
@@ -108,7 +110,7 @@
vDict = item [3][masterkey]
for record in vDict:
if record [field] == value:
- connectData [filterId] = record ['gnue_id']
+ connectData [filterId] = record [u'gnue_id']
found = True
break
@@ -160,32 +162,32 @@
def _initialize (self, table):
id = self._sm.store (self._sess_id, table, [None], [], [[]]) [0]
- return {'gnue_id': id}
+ return {u'gnue_id': id}
# ---------------------------------------------------------------------------
def _insert (self, table, newfields, recno):
f = newfields.copy ()
- id = f.pop ('gnue_id')
+ id = f.pop (u'gnue_id')
self._sm.store (self._sess_id, table, [id], f.keys (), [f.values ()])
# ---------------------------------------------------------------------------
def _update (self, table, oldfields, newfields, recno):
f = newfields
- id = oldfields ['gnue_id']
+ id = oldfields [u'gnue_id']
self._sm.store (self._sess_id, table, [id], f.keys (), [f.values ()])
# ---------------------------------------------------------------------------
def _delete (self, table, oldfields, recno):
- id = oldfields ['gnue_id']
+ id = oldfields [u'gnue_id']
self._sm.delete (self._sess_id, table, [id])
# ---------------------------------------------------------------------------
def _requery (self, table, oldfields, fields):
- id = oldfields ['gnue_id']
+ id = oldfields [u'gnue_id']
list = self._sm.load (self._sess_id, table, [id], fields) [0]
result = {}
for i in range (len (fields)):
@@ -195,7 +197,7 @@
# ---------------------------------------------------------------------------
def _call (self, table, oldfields, methodname, parameters):
- id = oldfields ['gnue_id']
+ id = oldfields [u'gnue_id']
return self._sm.call (self._sess_id, table, [id], methodname,
parameters) [0]
Modified:
trunk/gnue-common/src/datasources/drivers/appserver/appserver/ResultSet.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/appserver/appserver/ResultSet.py
2005-03-21 15:52:28 UTC (rev 7241)
+++ trunk/gnue-common/src/datasources/drivers/appserver/appserver/ResultSet.py
2005-03-21 15:53:35 UTC (rev 7242)
@@ -83,12 +83,12 @@
for record in records:
dict = {}
j = 0
- for fieldName in ['gnue_id'] + self.__fieldlist:
+ for fieldName in [u'gnue_id'] + self.__fieldlist:
dict [fieldName] = record [j]
j += 1
r = self._recordSetClass (parent = self, initialData = dict,
- primarykeyFields = ['gnue_id'])
+ primarykeyFields = [u'gnue_id'])
self._cachedRecords.append (r)
return True
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7242 - trunk/gnue-common/src/datasources/drivers/appserver/appserver,
reinhard <=