|
|
|
@ -100,7 +100,11 @@ class SQLBase(Base):
|
|
|
|
|
# _uri = [_item.strip() for _item in _uri if _item.strip()]
|
|
|
|
|
# return '/'.join(_uri)
|
|
|
|
|
return f'{_provider}://{_host}/{_database}' if _account == '' else f'{_provider}://{_account}{_host}/{_database}'
|
|
|
|
|
|
|
|
|
|
def close(self,) :
|
|
|
|
|
try:
|
|
|
|
|
self._engine.dispose()
|
|
|
|
|
except :
|
|
|
|
|
pass
|
|
|
|
|
class BaseReader(SQLBase):
|
|
|
|
|
def __init__(self,**_args):
|
|
|
|
|
super().__init__(**_args)
|
|
|
|
@ -142,4 +146,4 @@ class BaseWriter (SQLBase):
|
|
|
|
|
# if 'if_exists' in _args :
|
|
|
|
|
# _mode['if_exists'] = _args['if_exists']
|
|
|
|
|
|
|
|
|
|
_df.to_sql(_table,self._engine,**_mode)
|
|
|
|
|
_df.to_sql(_table,self._engine,**_mode)
|
|
|
|
|