-
Notifications
You must be signed in to change notification settings - Fork 192
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the feature
In dbapi.py, i notice that Connection
class DO have __enter__
, __exit__
, but Cursor
class does not
.
Is there a reason for why it doesn't have those classes? so that users can use with with
statement?
with connection.cursor() as cursor:
cursor.execute("SELECT * FROM table")
results = cursor.fetchall()
Describe alternatives you've considered
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
hashhar
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request