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 support for ASC and DESC in CREATE TABLE column constraints for SQLite. #1462

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

caldwell
Copy link
Contributor

@caldwell caldwell commented Oct 7, 2024

See: https://sqlite.org/lang_createtable.html

I didn't directly copy the AUTOINCREMENT code right above the diff because I happened to read #1430 the other day. Instead I created a new function in Dialect and enabled it in SQLiteDialect and GenericDialect—I hope this is ok.

I'm also a little disappointed that I couldn't deduplicate the ASC and DESC handling in src/parser/mod.rs. Maybe if/when if let chains are stabilized they could be consolidated cleanly…

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11223307115

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 21 of 25 (84.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.003%) to 89.305%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/dialect/generic.rs 1 2 50.0%
src/dialect/sqlite.rs 1 2 50.0%
src/dialect/mod.rs 0 2 0.0%
Totals Coverage Status
Change from base Build 11186281805: -0.003%
Covered Lines: 30010
Relevant Lines: 33604

💛 - Coveralls

Copy link
Contributor

@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.

Looks good (again) to me @caldwell

Thank you for breaking these PRs up into smaller ones for review

cc @iffyio

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

LGTM!

@alamb alamb merged commit ac956dc into apache:main Oct 8, 2024
10 checks passed
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.

4 participants