Skip to content

Commit 0e6efd8

Browse files
add open property to Connection to ensure maintenance of existing API
Signed-off-by: varun-edachali-dbx <[email protected]>
1 parent 7383290 commit 0e6efd8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/databricks/sql/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,11 @@ def get_protocol_version(openSessionResp):
313313
"""Delegate to Session class static method"""
314314
return Session.get_protocol_version(openSessionResp)
315315

316+
@property
317+
def open(self) -> bool:
318+
"""Return whether the connection is open by checking if the session is open."""
319+
return self.session.open
320+
316321
def cursor(
317322
self,
318323
arraysize: int = DEFAULT_ARRAY_SIZE,

0 commit comments

Comments
 (0)