|
|
@ -59,7 +59,7 @@ class SQLRW :
|
|
|
|
# _info['host'] = 'localhost' if 'host' not in _args else _args['host']
|
|
|
|
# _info['host'] = 'localhost' if 'host' not in _args else _args['host']
|
|
|
|
# # _info['port'] = SQLWriter.PROVIDERS[_args['provider']] if 'port' not in _args else _args['port']
|
|
|
|
# # _info['port'] = SQLWriter.PROVIDERS[_args['provider']] if 'port' not in _args else _args['port']
|
|
|
|
# _info['port'] = SQLWriter.REFERENCE[_provider]['port'] if 'port' not in _args else _args['port']
|
|
|
|
# _info['port'] = SQLWriter.REFERENCE[_provider]['port'] if 'port' not in _args else _args['port']
|
|
|
|
|
|
|
|
self.lock = False if 'lock' not in _args else _args['lock']
|
|
|
|
if 'username' in _args or 'user' in _args:
|
|
|
|
if 'username' in _args or 'user' in _args:
|
|
|
|
key = 'username' if 'username' in _args else 'user'
|
|
|
|
key = 'username' if 'username' in _args else 'user'
|
|
|
|
_info['user'] = _args[key]
|
|
|
|
_info['user'] = _args[key]
|
|
|
@ -272,6 +272,7 @@ class SQLWriter(SQLRW,Writer):
|
|
|
|
if _info.shape[0] == 0 :
|
|
|
|
if _info.shape[0] == 0 :
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
if self.lock :
|
|
|
|
SQLRW.lock.acquire()
|
|
|
|
SQLRW.lock.acquire()
|
|
|
|
|
|
|
|
|
|
|
|
if self._engine is not None:
|
|
|
|
if self._engine is not None:
|
|
|
@ -299,6 +300,7 @@ class SQLWriter(SQLRW,Writer):
|
|
|
|
|
|
|
|
|
|
|
|
if self._engine is None :
|
|
|
|
if self._engine is None :
|
|
|
|
self.conn.commit()
|
|
|
|
self.conn.commit()
|
|
|
|
|
|
|
|
if self.lock :
|
|
|
|
SQLRW.lock.release()
|
|
|
|
SQLRW.lock.release()
|
|
|
|
# cursor.close()
|
|
|
|
# cursor.close()
|
|
|
|
pass
|
|
|
|
pass
|
|
|
|