You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DB API 2.0 Connection class implements the context manager protocol and closes each cursor upon exit (disconnects each underlying native client).
In contrast, the native Client class does not implement the context manager protocol and seems to expect users to call client.disconnect() when they are done.
Is there any particular reason for this design? If not, could I potentially open a PR to add __enter__ and __exit__ methods to the native Client (along with tests and docs)?
The text was updated successfully, but these errors were encountered:
The DB API 2.0
Connection
class implements the context manager protocol and closes each cursor upon exit (disconnects each underlying native client).In contrast, the native
Client
class does not implement the context manager protocol and seems to expect users to callclient.disconnect()
when they are done.Is there any particular reason for this design? If not, could I potentially open a PR to add
__enter__
and__exit__
methods to the nativeClient
(along with tests and docs)?The text was updated successfully, but these errors were encountered: