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

Commit 49aa84c

Browse files
committed
test: native enums
1 parent 0f40a16 commit 49aa84c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

google/cloud/sqlalchemy_spanner/sqlalchemy_spanner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ class SpannerDialect(DefaultDialect):
798798
supports_sequences = True
799799
sequences_optional = False
800800
supports_identity_columns = True
801-
supports_native_enum = True
801+
supports_native_enum = False
802802
supports_native_boolean = True
803803
supports_native_decimal = True
804804
supports_statement_cache = True

test/mockserver_tests/test_basics.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
String,
2727
func,
2828
text,
29-
BigInteger,
29+
BigInteger, Enum,
3030
)
3131
from sqlalchemy.orm import Session, DeclarativeBase, Mapped, mapped_column
3232
from sqlalchemy.testing import eq_, is_instance_of
@@ -120,6 +120,7 @@ def test_create_table(self):
120120
metadata,
121121
Column("user_id", Integer, primary_key=True),
122122
Column("user_name", String(16), nullable=False),
123+
Column("status", Enum("pending_activation", "active", "disabled"))
123124
)
124125
metadata.create_all(engine)
125126
requests = self.database_admin_service.requests
@@ -130,7 +131,8 @@ def test_create_table(self):
130131
"CREATE TABLE users (\n"
131132
"\tuser_id INT64 NOT NULL "
132133
"GENERATED BY DEFAULT AS IDENTITY (BIT_REVERSED_POSITIVE), \n"
133-
"\tuser_name STRING(16) NOT NULL\n"
134+
"\tuser_name STRING(16) NOT NULL, \n"
135+
"\tstatus STRING(18)\n"
134136
") PRIMARY KEY (user_id)",
135137
requests[0].statements[0],
136138
)

0 commit comments

Comments
 (0)