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

MS SQL Server: add support for IDENTITY column option #1432

Merged
merged 3 commits into from
Sep 20, 2024

Conversation

7phs
Copy link
Contributor

@7phs 7phs commented Sep 18, 2024

This PR implements support IDENTITY column option of T-SQL (MS SQL Server). Example:

CREATE TABLE [dbo].[table_name]
(
  [columnA] int IDENTITY(1,1) NOT NULL,
  [columnB] nvarchar(255) NULL
)

@coveralls
Copy link

coveralls commented Sep 18, 2024

Pull Request Test Coverage Report for Build 10959695994

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

  • 86 of 90 (95.56%) changed or added relevant lines in 3 files are covered.
  • 1215 unchanged lines in 9 files lost coverage.
  • Overall coverage increased (+0.01%) to 89.349%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/sqlparser_mssql.rs 72 76 94.74%
Files with Coverage Reduction New Missed Lines %
tests/sqlparser_bigquery.rs 1 90.25%
src/dialect/duckdb.rs 1 61.11%
src/dialect/generic.rs 1 63.41%
src/dialect/postgresql.rs 2 68.48%
src/dialect/mod.rs 11 68.13%
tests/sqlparser_postgres.rs 52 88.61%
src/ast/mod.rs 289 82.43%
tests/sqlparser_common.rs 406 89.76%
src/parser/mod.rs 452 93.35%
Totals Coverage Status
Change from base Build 10892026190: 0.01%
Covered Lines: 29689
Relevant Lines: 33228

💛 - Coveralls

@7phs 7phs force-pushed the t-sql-create-table-with-identity-column branch from d74fd2c to 5687466 Compare September 18, 2024 16:39
src/ast/ddl.rs Outdated Show resolved Hide resolved
src/ast/ddl.rs Outdated Show resolved Hide resolved
src/ast/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
tests/sqlparser_mssql.rs Outdated Show resolved Hide resolved
@7phs 7phs requested review from bombsimon and iffyio September 20, 2024 13:08
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! cc @alamb

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.

Thanks @7phs and @iffyio

@alamb alamb merged commit fb42425 into apache:main Sep 20, 2024
10 checks passed
@iffyio iffyio deleted the t-sql-create-table-with-identity-column branch September 20, 2024 18:32
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.

5 participants