[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVSROOT: /cvsroot/gnue
From: |
Jan Ischebeck |
Subject: |
CVSROOT: /cvsroot/gnue |
Date: |
Wed, 19 Nov 2003 18:05:23 -0500 |
Module name: gnue-common
Branch: datasource-cleanup
Changes by: Jan Ischebeck <address@hidden> 03/11/19 18:05:23
Reply-to: address@hidden
CVSROOT: /cvsroot/gnue
Module name: gnue-common
Branch: datasource-cleanup
Changes by: Jan Ischebeck <address@hidden> 03/11/19 18:05:23
Modified files:
src/datasources/drivers/appserver/appserver: Connection.py
src/datasources/drivers/appserver/Schema/Discovery:
Introspection.py
Log message:
fix error handling and introspection support for appserver dbdriver
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/appserver/appserver/Connection.py.diff?only_with_tag=datasource-cleanup&tr1=1.1.2.4&tr2=1.1.2.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/datasources/drivers/appserver/Schema/Discovery/Introspection.py.diff?only_with_tag=datasource-cleanup&tr1=1.1.2.3&tr2=1.1.2.4&r1=text&r2=text
Patches:
Index:
gnue-common/src/datasources/drivers/appserver/Schema/Discovery/Introspection.py
diff -c
gnue-common/src/datasources/drivers/appserver/Schema/Discovery/Introspection.py:1.1.2.3
gnue-common/src/datasources/drivers/appserver/Schema/Discovery/Introspection.py:1.1.2.4
***
gnue-common/src/datasources/drivers/appserver/Schema/Discovery/Introspection.py:1.1.2.3
Tue Nov 18 22:00:24 2003
---
gnue-common/src/datasources/drivers/appserver/Schema/Discovery/Introspection.py
Wed Nov 19 18:05:23 2003
***************
*** 33,39 ****
import sys
from gnue.common.apps import GDebug, GConfig
- from gnue.common.apps import GDebug, GConfig
from gnue.common.datasources import GIntrospection
class Introspection(GIntrospection.Introspection):
--- 33,38 ----
***************
*** 68,74 ****
return []
try:
! listcursor =
self._connection.native.request('gnue_class',[],['gnue_module'],['gnue_name','gnue_comment','gnue_module'])
except Exception, msg:
print "error %s" %msg
GDebug.printMesg(1,_("Error creating introspection module list \n\n
--- %s ---)") % msg)
--- 67,73 ----
return []
try:
! listcursor =
self._connection.request('gnue_class',[],['gnue_module'],['gnue_name','gnue_comment','gnue_module'])
except Exception, msg:
print "error %s" %msg
GDebug.printMesg(1,_("Error creating introspection module list \n\n
--- %s ---)") % msg)
***************
*** 99,105 ****
def getSchemaByName(self, name, type=None):
try:
! listcursor = self._connection.native.request('gnue_class', [["eq",
""], ["field", "gnue_name"], ["const", name]],
['gnue_module'],['gnue_name','gnue_comment','gnue_module'])
except Exception, msg:
print "error %s" %msg
--- 98,104 ----
def getSchemaByName(self, name, type=None):
try:
! listcursor = self._connection.request('gnue_class', [["eq", ""],
["field", "gnue_name"], ["const", name]],
['gnue_module'],['gnue_name','gnue_comment','gnue_module'])
except Exception, msg:
print "error %s" %msg
***************
*** 127,133 ****
def __getChildSchema(self, parent):
try:
# fetch all properties used by class "parent"
! listcursor = self._connection.native.request('gnue_property', # class
[["eq", ""], ["field",
"gnue_class"],
["const",
parent.gnue_id]], # condition
['gnue_module'], # sort
--- 126,132 ----
def __getChildSchema(self, parent):
try:
# fetch all properties used by class "parent"
! listcursor = self._connection.request('gnue_property', # class
[["eq", ""], ["field",
"gnue_class"],
["const",
parent.gnue_id]], # condition
['gnue_module'], # sort
Index: gnue-common/src/datasources/drivers/appserver/appserver/Connection.py
diff -c
gnue-common/src/datasources/drivers/appserver/appserver/Connection.py:1.1.2.4
gnue-common/src/datasources/drivers/appserver/appserver/Connection.py:1.1.2.5
***
gnue-common/src/datasources/drivers/appserver/appserver/Connection.py:1.1.2.4
Tue Nov 18 21:07:08 2003
--- gnue-common/src/datasources/drivers/appserver/appserver/Connection.py
Wed Nov 19 18:05:22 2003
***************
*** 33,39 ****
__all__ = ['Connection']
! from gnue.common.datasources import GConditions, Exceptions
from gnue.common.datasources.drivers.Base import Connection as BaseConnection
from gnue.common.apps import GDebug
from gnue.common.rpc import GComm
--- 33,39 ----
__all__ = ['Connection']
! from gnue.common.datasources import GDataObjects, GConditions
from gnue.common.datasources.drivers.Base import Connection as BaseConnection
from gnue.common.apps import GDebug
from gnue.common.rpc import GComm
***************
*** 49,54 ****
--- 49,58 ----
from DataObject import DataObject
from gnue.common.datasources.drivers.appserver.Schema.Discovery.Introspection
import Introspection
+
+ # TODO: move all non standart Connection functions (request, ...) into a
subobject native
+ # to prevent namespace conflicts
+
class Connection(BaseConnection):
_DatabaseError = GComm.Error
***************
*** 86,92 ****
GDebug.printMesg(3,"Open Session ...")
GDebug.printMesg(1,"Logging into appserver as user '%s'" % (user))
self._sess_id = self._sm.open({'user':user,'password':passwd})
! except Exception,msg:
tmsg = _("Error loging into appserver: %s") % msg
raise GDataObjects.ConnectionError, tmsg
--- 90,97 ----
GDebug.printMesg(3,"Open Session ...")
GDebug.printMesg(1,"Logging into appserver as user '%s'" % (user))
self._sess_id = self._sm.open({'user':user,'password':passwd})
!
! except Exception, msg:
tmsg = _("Error loging into appserver: %s") % msg
raise GDataObjects.ConnectionError, tmsg
- CVSROOT: /cvsroot/gnue, Jason Cater, 2003/11/07
- CVSROOT: /cvsroot/gnue, Jason Cater, 2003/11/08
- CVSROOT: /cvsroot/gnue, Jason Cater, 2003/11/18
- CVSROOT: /cvsroot/gnue, Jason Cater, 2003/11/18
- CVSROOT: /cvsroot/gnue, Jason Cater, 2003/11/18
- CVSROOT: /cvsroot/gnue, Jason Cater, 2003/11/18
- CVSROOT: /cvsroot/gnue, Jason Cater, 2003/11/18
- CVSROOT: /cvsroot/gnue, Jan Ischebeck, 2003/11/19
- CVSROOT: /cvsroot/gnue, Jan Ischebeck, 2003/11/19
- CVSROOT: /cvsroot/gnue, Jan Ischebeck, 2003/11/19
- CVSROOT: /cvsroot/gnue,
Jan Ischebeck <=