Skip to content

Commit 9299212

Browse files
ankiagaolavloite
andauthored
feat: Exposing Spanner client in dbapi connection (#1100)
* feat: Exposing Spanner client in dbapi connection * Update comment Co-authored-by: Knut Olav Løite <[email protected]> --------- Co-authored-by: Knut Olav Løite <[email protected]>
1 parent d5acc26 commit 9299212

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

google/cloud/spanner_dbapi/connection.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ def __init__(self, instance, database=None, read_only=False):
117117
self._batch_dml_executor: BatchDmlExecutor = None
118118
self._transaction_helper = TransactionRetryHelper(self)
119119

120+
@property
121+
def spanner_client(self):
122+
"""Client for interacting with Cloud Spanner API. This property exposes
123+
the spanner client so that underlying methods can be accessed.
124+
"""
125+
return self._instance._client
126+
120127
@property
121128
def autocommit(self):
122129
"""Autocommit mode flag for this connection.

0 commit comments

Comments
 (0)