Skip to content

Commit 03d3ae7

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 3fd2a46 commit 03d3ae7

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

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

0 commit comments

Comments
 (0)