[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r6374 - in trunk/gnue-common/src/datasources: . drivers/interbase/interb
From: |
johannes |
Subject: |
r6374 - in trunk/gnue-common/src/datasources: . drivers/interbase/interbase |
Date: |
Wed, 22 Sep 2004 07:50:34 -0500 (CDT) |
Author: johannes
Date: 2004-09-22 07:50:33 -0500 (Wed, 22 Sep 2004)
New Revision: 6374
Modified:
trunk/gnue-common/src/datasources/GDataSource.py
trunk/gnue-common/src/datasources/drivers/interbase/interbase/Connection.py
trunk/gnue-common/src/datasources/drivers/interbase/interbase/DataObject.py
Log:
Fixed treatement of identifiers in fieldlists
Modified: trunk/gnue-common/src/datasources/GDataSource.py
===================================================================
--- trunk/gnue-common/src/datasources/GDataSource.py 2004-09-22 12:29:39 UTC
(rev 6373)
+++ trunk/gnue-common/src/datasources/GDataSource.py 2004-09-22 12:50:33 UTC
(rev 6374)
@@ -30,7 +30,7 @@
#
# $Id: $
-from gnue.common.apps import GDebug, i18n
+from gnue.common.apps import i18n, errors
from gnue.common.datasources import GDataObjects
from gnue.common.definitions import GObjects
import sys, string, types, cStringIO
@@ -168,7 +168,7 @@
if hasattr(rset,'callFunc'):
return rset.callFunc(name,params)
else:
- tmsg = _("Backend doesn't support the trigger 'call' function")
+ tmsg = u_("Backend doesn't support the trigger 'call' function")
raise StandardError, tmsg
#
@@ -202,12 +202,12 @@
# We have to bind to something, so bind to empty or static driver
if not self.type=="static":
from gnue.common.datasources.drivers.special.unbound import Driver
- GDebug.printMesg (7, 'Using empty data driver')
+ gDebug (7, 'Using empty data driver')
dataObject = Driver.supportedDataObjects['object'](None)
else:
from gnue.common.datasources.drivers.special.static import Connection
- GDebug.printMesg (7, 'Using static data driver')
+ gDebug (7, 'Using static data driver')
dataObject = Connection.supportedDataObjects['object'](None)
for child in self._children:
@@ -223,7 +223,7 @@
# catch this exception and handle it properly (exit w/message)
dataObject = \
self._connections.getDataObject(self.connection, self.type)
- GDebug.printMesg (7, "GDataSource.py bound to %s " % self._dataObject)
+ gDebug (7, "GDataSource.py bound to %s " % dataObject)
self.name = string.lower(self.name)
self._topObject._datasourceDictionary[self.name]=self
@@ -284,7 +284,11 @@
def referenceField(self, field, defaultValue=None):
- GDebug.printMesg(7,'Field %s implicitly referenced' % field)
+ if self._dataObject is not None and \
+ self._dataObject._connection is not None:
+ field = self._dataObject._connection.identifier (field)
+
+ gDebug (7, 'Field %s implicitly referenced' % field)
self._fieldReferences[field] = ""
if defaultValue != None:
@@ -299,7 +303,7 @@
self.referenceField(*field)
def referenceUnboundField(self, field, defaultValue=None):
- GDebug.printMesg(7,'Field %s implicitly referenced' % field)
+ gDebug (7,'Field %s implicitly referenced' % field)
self._unboundFieldReferences[field] = True
if defaultValue != None:
@@ -349,7 +353,8 @@
def primaryInit(self):
self._topObject = self.findParentOfType(self._toplevelParent)
- GDebug.printMesg(10,"Setting %s to connect mgr %s"
%(self.name,self._topObject._connections))
+ gDebug (10, "Setting %s to connect mgr %s" \
+ % (self.name, self._topObject._connections))
self.setConnectionManager(self._topObject._connections)
self.initialize()
self.connect()
@@ -365,8 +370,8 @@
if hasattr(self, 'master') and self.master:
self.master = string.lower(self.master)
- GDebug.printMesg(3,"Linking detail '%s' to master '%s'" \
- % (self.name, self.master) )
+ gDebug (3, "Linking detail '%s' to master '%s'" \
+ % (self.name, self.master))
if self._topObject._datasourceDictionary.has_key(self.master):
self._topObject._datasourceDictionary[self.master] \
@@ -744,12 +749,8 @@
if rs.firstRecord ():
paramDict ['connection'] = connection
- try:
- res = rs.current.callFunc ("gnue_%s" % element, paramDict)
+ res = rs.current.callFunc ("gnue_%s" % element, paramDict)
- except Exception, e:
- raise
-
if debugFileName is not None:
dfile = open (debugFileName, 'w')
dfile.write (res.encode ('utf-8'))
Modified:
trunk/gnue-common/src/datasources/drivers/interbase/interbase/Connection.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/interbase/interbase/Connection.py
2004-09-22 12:29:39 UTC (rev 6373)
+++ trunk/gnue-common/src/datasources/drivers/interbase/interbase/Connection.py
2004-09-22 12:50:33 UTC (rev 6374)
@@ -135,7 +135,7 @@
# ---------------------------------------------------------------------------
def getSequence (self, name):
- return self.__singleQuery ("SELECt gen_id(%s,1) FROM rdb$database" % name)
+ return self.__singleQuery ("SELECT gen_id(%s,1) FROM rdb$database" % name)
# ---------------------------------------------------------------------------
Modified:
trunk/gnue-common/src/datasources/drivers/interbase/interbase/DataObject.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/interbase/interbase/DataObject.py
2004-09-22 12:29:39 UTC (rev 6373)
+++ trunk/gnue-common/src/datasources/drivers/interbase/interbase/DataObject.py
2004-09-22 12:50:33 UTC (rev 6374)
@@ -33,7 +33,7 @@
import sys
from gnue.common.datasources import GDataObjects
-from gnue.common.apps import GDebug
+from gnue.common.apps import errors
from gnue.common.datasources.drivers import DBSIG2
from ResultSet import ResultSet
@@ -59,8 +59,8 @@
cursor = self._connection.makecursor (query)
cursor.arraysize = self.cache
- except self._DatabaseError, err:
- raise GDataObjects.ConnectionError, err
+ except self._DatabaseError:
+ raise GDataObjects.ConnectionError, errors.getException () [2]
# Our ResultSet class performs an implicit record-count in it's constructor
# so we won't force another duplicate count
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r6374 - in trunk/gnue-common/src/datasources: . drivers/interbase/interbase,
johannes <=