run lists if queries
This commit is contained in:
parent
e5995a6423
commit
8c5e39448b
1 changed files with 4 additions and 1 deletions
|
@ -80,8 +80,11 @@ class MutableDict(Mutable, dict):
|
||||||
self.changed()
|
self.changed()
|
||||||
|
|
||||||
def run_sql(sql):
|
def run_sql(sql):
|
||||||
|
if isinstance(sql, str):
|
||||||
|
sql = [sql]
|
||||||
with session() as s:
|
with session() as s:
|
||||||
s.connection().execute(sql)
|
for q in sql:
|
||||||
|
s.connection().execute(q)
|
||||||
s.commit()
|
s.commit()
|
||||||
|
|
||||||
def table_exists(table):
|
def table_exists(table):
|
||||||
|
|
Loading…
Reference in a new issue