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

Fix!: make ObjectIdentifier, IntervalSpan and PseudoType DataTypes #2315

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

georgesittas
Copy link
Collaborator

Fixes the issue mentioned in #2277 (comment)

Copy link
Owner

@tobymao tobymao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do these have enums?

@georgesittas
Copy link
Collaborator Author

do these have enums?

What do you mean?

@tobymao
Copy link
Owner

tobymao commented Sep 25, 2023

exprission.DataType enums?

@georgesittas
Copy link
Collaborator Author

Yep I think they do, if I understand the question correctly:

>>> import sqlglot
>>> dir(sqlglot.parse_one("CREATE TABLE public.propertydata (propertyvalue oid)", "postgres").find(sqlglot.exp.DataType).__class__)
['FLOAT_TYPES', 'INTEGER_TYPES', 'NUMERIC_TYPES', 'TEMPORAL_TYPES', 'TEXT_TYPES', 'Type', ....]

@georgesittas georgesittas merged commit cdcc564 into main Sep 25, 2023
@georgesittas georgesittas deleted the jo/expr_type_fix branch September 25, 2023 18:00
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

Successfully merging this pull request may close these issues.

2 participants