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

Add NUMERIC and DEC data types, and fix DECIMAL display for all dialects #695

Merged
merged 1 commit into from Oct 31, 2022
Merged

Add NUMERIC and DEC data types, and fix DECIMAL display for all dialects #695

merged 1 commit into from Oct 31, 2022

Conversation

AugustoFKL
Copy link
Contributor

@AugustoFKL AugustoFKL commented Oct 29, 2022

feature!: added NUMERIC and DEC ANSI data types, and now the DECIMAL type prints DECIMAL instead of NUMERIC.

BREAKING CHANGE: enum DATA TYPE variants changed, changing any API that uses it.

Based on ANSI exact numbers (1)

[1] : https://jakewheat.github.io/sql-overview/sql-2016-foundation-grammar.html#exact-numeric-type

type prints DECIMAL instead of NUMERIC.

BREAKING CHANGE: enum DATA TYPE variants changed, changing any API that
uses it.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3353224529

  • 18 of 18 (100.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 85.963%

Files with Coverage Reduction New Missed Lines %
src/ast/data_type.rs 1 88.62%
Totals Coverage Status
Change from base Build 3292360592: 0.01%
Covered Lines: 10913
Relevant Lines: 12695

💛 - Coveralls

@AugustoFKL
Copy link
Contributor Author

@alamb ready for review :)

Copy link
Collaborator

@alamb alamb left a comment

Choose a reason for hiding this comment

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

LGTM -- thank you very much @AugustoFKL

"SELECT CAST(id AS DEC) FROM customer",
"SELECT CAST(id AS NUMERIC) FROM customer",
);
verified_stmt("SELECT CAST(id AS DEC) FROM customer");
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice drive by cleanup

@alamb alamb merged commit 1b3778e into sqlparser-rs:main Oct 31, 2022
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.

None yet

3 participants