gabledata/recap

Convert column defaults to proper types in DbapiReader

Opened this issue · 0 comments

The DbapiReader currently stores all default values for columns as strings:

if column_props["COLUMN_DEFAULT"] is not None or is_nullable:
    # TODO Convert default value to the correct type, not just a string
    base_type.extra_attrs["default"] = column_props["COLUMN_DEFAULT"]

It would be better if default types matched the RecapTypes that are created (e.g. IntType would be have a extra_attrs["default"] = int(0) not a str as it is now.