Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit c80834f

Browse files
committed
fix(spanner): restore implicit database_dialect reload in sync client
1 parent 4065da7 commit c80834f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

google/cloud/spanner_v1/_async/database.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ def database_dialect(self):
410410
:rtype: :class:`google.cloud.spanner_admin_database_v1.types.DatabaseDialect`
411411
:returns: the dialect of the database
412412
"""
413+
if self._database_dialect == DatabaseDialect.DATABASE_DIALECT_UNSPECIFIED:
414+
if not CrossSync.is_async:
415+
self.reload()
413416
return self._database_dialect
414417

415418
@property

google/cloud/spanner_v1/database.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ def database_dialect(self):
358358
359359
:rtype: :class:`google.cloud.spanner_admin_database_v1.types.DatabaseDialect`
360360
:returns: the dialect of the database"""
361+
if self._database_dialect == DatabaseDialect.DATABASE_DIALECT_UNSPECIFIED:
362+
self.reload()
361363
return self._database_dialect
362364

363365
@property

0 commit comments

Comments
 (0)