33 |
import sys |
import sys |
34 |
|
|
35 |
from gnue.common.apps import GDebug, GConfig |
from gnue.common.apps import GDebug, GConfig |
|
from gnue.common.apps import GDebug, GConfig |
|
36 |
from gnue.common.datasources import GIntrospection |
from gnue.common.datasources import GIntrospection |
37 |
|
|
38 |
class Introspection(GIntrospection.Introspection): |
class Introspection(GIntrospection.Introspection): |
67 |
return [] |
return [] |
68 |
|
|
69 |
try: |
try: |
70 |
listcursor = self._connection.native.request('gnue_class',[],['gnue_module'],['gnue_name','gnue_comment','gnue_module']) |
listcursor = self._connection.request('gnue_class',[],['gnue_module'],['gnue_name','gnue_comment','gnue_module']) |
71 |
except Exception, msg: |
except Exception, msg: |
72 |
print "error %s" %msg |
print "error %s" %msg |
73 |
GDebug.printMesg(1,_("Error creating introspection module list \n\n --- %s ---)") % msg) |
GDebug.printMesg(1,_("Error creating introspection module list \n\n --- %s ---)") % msg) |
98 |
|
|
99 |
def getSchemaByName(self, name, type=None): |
def getSchemaByName(self, name, type=None): |
100 |
try: |
try: |
101 |
listcursor = self._connection.native.request('gnue_class', [["eq", ""], ["field", "gnue_name"], ["const", name]], |
listcursor = self._connection.request('gnue_class', [["eq", ""], ["field", "gnue_name"], ["const", name]], |
102 |
['gnue_module'],['gnue_name','gnue_comment','gnue_module']) |
['gnue_module'],['gnue_name','gnue_comment','gnue_module']) |
103 |
except Exception, msg: |
except Exception, msg: |
104 |
print "error %s" %msg |
print "error %s" %msg |
126 |
def __getChildSchema(self, parent): |
def __getChildSchema(self, parent): |
127 |
try: |
try: |
128 |
# fetch all properties used by class "parent" |
# fetch all properties used by class "parent" |
129 |
listcursor = self._connection.native.request('gnue_property', # class |
listcursor = self._connection.request('gnue_property', # class |
130 |
[["eq", ""], ["field", "gnue_class"], |
[["eq", ""], ["field", "gnue_class"], |
131 |
["const", parent.gnue_id]], # condition |
["const", parent.gnue_id]], # condition |
132 |
['gnue_module'], # sort |
['gnue_module'], # sort |