You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warn("Column type LIST will be deprecated in a future version, use ARRAY instead.")
185
-
self.type=OrsoTypes.ARRAY
186
-
eliftype_name=="NUMERIC":
187
-
warn(
188
-
"Column type NUMERIC will be deprecated in a future version, use DECIMAL, DOUBLE or INTEGER instead. Mapped to DOUBLE, this may not be compatible with all values NUMERIC was compatible with."
189
-
)
190
-
self.type=OrsoTypes.DOUBLE
191
-
eliftype_name=="BSON":
192
-
warn("Column type BSON will be deprecated in a future version, use JSONB instead.")
193
-
self.type=OrsoTypes.JSONB
194
-
eliftype_name=="STRING":
195
-
raiseValueError(
196
-
f"Unknown column type '{self.type}' for column '{self.name}'. Did you mean 'VARCHAR'?"
197
-
)
198
-
elifself.type!=0:
224
+
parsed_types=_parse_type(type_name)
225
+
ifisinstance(parsed_types, str):
226
+
ifparsed_types=="ARRAY":
227
+
warn("Column type ARRAY without subtype, defaulting to VARCHAR.")
228
+
self.type=OrsoTypes.ARRAY
229
+
self.subtype=OrsoTypes.VARCHAR
230
+
elifparsed_typesinOrsoTypes.__members__:
231
+
self.type=OrsoTypes[parsed_types]
232
+
elifparsed_types=="LIST":
233
+
warn(
234
+
"Column type LIST will be deprecated in a future version, use ARRAY instead."
235
+
)
236
+
self.type=OrsoTypes.ARRAY
237
+
elifparsed_types=="NUMERIC":
238
+
warn(
239
+
"Column type NUMERIC will be deprecated in a future version, use DECIMAL, DOUBLE or INTEGER instead. Mapped to DOUBLE, this may not be compatible with all values NUMERIC was compatible with."
240
+
)
241
+
self.type=OrsoTypes.DOUBLE
242
+
elifparsed_types=="BSON":
243
+
warn(
244
+
"Column type BSON will be deprecated in a future version, use JSONB instead."
245
+
)
246
+
self.type=OrsoTypes.JSONB
247
+
elifparsed_types=="STRING":
248
+
raiseValueError(
249
+
f"Unknown column type '{self.type}' for column '{self.name}'. Did you mean 'VARCHAR'?"
250
+
)
251
+
eliftype_name=="0":
252
+
self.type=0
253
+
else:
254
+
raiseValueError(f"Unknown column type '{self.type}' for column '{self.name}'.")
0 commit comments