feat(chalice): allow recreate cursor
This commit is contained in:
parent
d1da53709f
commit
afeccbbc26
1 changed files with 1 additions and 0 deletions
|
|
@ -117,6 +117,7 @@ class PostgresClient:
|
|||
def __enter__(self):
|
||||
if self.cursor is None:
|
||||
self.cursor = self.connection.cursor(cursor_factory=psycopg2.extras.RealDictCursor)
|
||||
self.cursor.recreate = self.recreate_cursor
|
||||
return self.cursor
|
||||
|
||||
def __exit__(self, *args):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue