bug fix: missing table (sql)

v2.4
Steve Nyemba 1 month ago
parent c7a5d42f42
commit b1975d6a42

@ -1,6 +1,6 @@
__app_name__ = 'data-transport' __app_name__ = 'data-transport'
__author__ = 'The Phi Technology' __author__ = 'The Phi Technology'
__version__= '2.4.20' __version__= '2.4.22'
__edition__= 'enterprise' __edition__= 'enterprise'
__email__ = "info@the-phi.com" __email__ = "info@the-phi.com"
__license__=f""" __license__=f"""

@ -56,13 +56,18 @@ class Base:
# _map = {'BIGINT':'INTEGER','TEXT':'STRING','DOUBLE_PRECISION':'FLOAT','NUMERIC':'FLOAT','DECIMAL':'FLOAT','REAL':'FLOAT'} # _map = {'BIGINT':'INTEGER','TEXT':'STRING','DOUBLE_PRECISION':'FLOAT','NUMERIC':'FLOAT','DECIMAL':'FLOAT','REAL':'FLOAT'}
# _schema = [{"name":_attr.name,"type":_map.get(str(_attr.type),str(_attr.type))} for _attr in _handler.tables[_table].columns] # _schema = [{"name":_attr.name,"type":_map.get(str(_attr.type),str(_attr.type))} for _attr in _handler.tables[_table].columns]
# #
if _table : try:
_inspector = inspect(self._engine) if _table :
_columns = _inspector.get_columns(_table) _inspector = inspect(self._engine)
_schema = [{'name':column['name'],'type':_map.get(str(column['type']),str(column['type'])) } for column in _columns] _columns = _inspector.get_columns(_table)
return _schema _schema = [{'name':column['name'],'type':_map.get(str(column['type']),str(column['type'])) } for column in _columns]
else: return _schema
return [] except Exception as e:
pass
# else:
return []
def has(self,**_args): def has(self,**_args):
return self.meta(**_args) return self.meta(**_args)
def apply(self,sql): def apply(self,sql):

Loading…
Cancel
Save