Skip to content

Commit 61300b2

Browse files
add open property to Connection to ensure maintenance of existing API
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 8ef6ed6 commit 61300b2

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
@@ -344,6 +344,11 @@ def get_protocol_version(openSessionResp):
344344
"""Delegate to Session class static method"""
345345
return Session.get_protocol_version(openSessionResp)
346346

347+
@property
348+
def open(self) -> bool:
349+
"""Return whether the connection is open by checking if the session is open."""
350+
return self.session.open
351+
347352
def cursor(
348353
self,
349354
arraysize: int = DEFAULT_ARRAY_SIZE,

0 commit comments

Comments
 (0)