bug fix: sql writer::apply
This commit is contained in:
parent
18c9245ace
commit
898455f23c
|
@ -60,12 +60,12 @@ class SQLRW :
|
||||||
"""
|
"""
|
||||||
cursor = self.conn.cursor()
|
cursor = self.conn.cursor()
|
||||||
try:
|
try:
|
||||||
if "insert" in _sql .lower() or "update" in _sql.lower() :
|
if "select" in _sql.lower() :
|
||||||
# Executing a command i.e no expected return values ...
|
|
||||||
cursor.execute(_sql)
|
|
||||||
else:
|
|
||||||
cursor.close()
|
cursor.close()
|
||||||
return pd.read_sql(_sql,self.conn)
|
return pd.read_sql(_sql,self.conn)
|
||||||
|
else:
|
||||||
|
# Executing a command i.e no expected return values ...
|
||||||
|
cursor.execute(_sql)
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|
Loading…
Reference in New Issue