Skip to content

Commit

Permalink
Merge pull request #21 from Downtownapp/master
Browse files Browse the repository at this point in the history
Hotfix: savepoints
  • Loading branch information
rudyryk committed Feb 24, 2016
2 parents f2a3ef9 + 3121797 commit ea038fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions peewee_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,15 +781,15 @@ def __init__(self, db, sid=None):

@asyncio.coroutine
def commit(self):
yield from _run_sql('RELEASE SAVEPOINT %s;' % self.quoted_sid)
yield from _run_sql(self.db, 'RELEASE SAVEPOINT %s;' % self.quoted_sid)

@asyncio.coroutine
def rollback(self):
yield from _run_sql('ROLLBACK TO SAVEPOINT %s;' % self.quoted_sid)
yield from _run_sql(self.db, 'ROLLBACK TO SAVEPOINT %s;' % self.quoted_sid)

@asyncio.coroutine
def __aenter__(self):
yield from _run_sql('SAVEPOINT %s;' % self.quoted_sid)
yield from _run_sql(self.db, 'SAVEPOINT %s;' % self.quoted_sid)
return self

@asyncio.coroutine
Expand Down

0 comments on commit ea038fa

Please sign in to comment.