Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert column defaults to proper types in DbapiReader #300

Open
criccomini opened this issue Jul 2, 2023 · 0 comments
Open

Convert column defaults to proper types in DbapiReader #300

criccomini opened this issue Jul 2, 2023 · 0 comments

Comments

@criccomini
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant