Commit 17e3aba
authored
feat: Support Server-Side Checks for Enums (googleapis#694)
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: googleapis#6861 parent bcb8144 commit 17e3aba
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 | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | | - | |
811 | 810 | | |
812 | 811 | | |
813 | 812 | | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
814 | 819 | | |
815 | 820 | | |
816 | 821 | | |
| |||
| 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