Skip to content

Commit

Permalink
feat(mssql): mssql queries with no output should not crash, insert, d…
Browse files Browse the repository at this point in the history
…elete statements

closes #72
  • Loading branch information
Christopher Pickering committed Apr 14, 2022
1 parent a1359bd commit a59b464
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions runner/scripts/em_sqlserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ def __rows(self, size: int = 500) -> Generator:
db.session.commit()

for iteration in itertools.count():
if self.cur.description is None:
break

rows = self.cur.fetchmany(size)

if not rows:
break

Expand Down

0 comments on commit a59b464

Please sign in to comment.