Commit f4ea72d
committed
feat: Support Server-Side Checks for Enums
Spanner uses protos for enums. Creating a column like
Column("an_enum", Enum("A", "B", "C")) will result in a String
column. Setting supports_native_enum to False allows SQLAlchemy
to generate check constraints to enforce the enum values if the
create_constraint=True flag is passed to the Enum constructor.
Fixes: #6861 parent 0f40a16 commit f4ea72d
File tree
2 files changed
+11
-2
lines changed- google/cloud/sqlalchemy_spanner
- test/mockserver_tests
2 files changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
798 | 798 | | |
799 | 799 | | |
800 | 800 | | |
801 | | - | |
802 | 801 | | |
803 | 802 | | |
804 | 803 | | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
805 | 810 | | |
806 | 811 | | |
807 | 812 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
| |||
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
| |||
0 commit comments