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
Distinguish between INT
and INTEGER
types
#525
Conversation
@@ -35,7 +35,7 @@ fn parse_create_table_with_defaults() { | |||
activebool boolean DEFAULT true NOT NULL, | |||
create_date date DEFAULT now()::text NOT NULL, | |||
last_update timestamp without time zone DEFAULT now() NOT NULL, | |||
active integer NOT NULL | |||
active int NOT NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎶 I change the test to cover both variants of ints (lean testing)
Pull Request Test Coverage Report for Build 2535650811
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @frolovdev -- other than the docstring this looks great.
👍
let optional_precision = self.parse_optional_precision(); | ||
if self.parse_keyword(Keyword::UNSIGNED) { | ||
Ok(DataType::UnsignedInt(optional_precision?)) | ||
} else { | ||
Ok(DataType::Int(optional_precision?)) | ||
} | ||
} | ||
Keyword::INTEGER => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Applied |
Thanks again @frolovdev ! |
* support integer * fmt * Update src/ast/data_type.rs Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org> Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
@alamb (you said that I can ping you :d)
Closes #398