Skip to content

Throw exception when primary key could not be determined - #414

Merged
Ayush Agarwal (ayush3797) merged 5 commits into
mainfrom
dev/agarwalayush/feature-404
May 16, 2022
Merged

Throw exception when primary key could not be determined#414
Ayush Agarwal (ayush3797) merged 5 commits into
mainfrom
dev/agarwalayush/feature-404

Conversation

@ayush3797

Copy link
Copy Markdown
Contributor

Why is the change needed?

Sometimes, view definition can be quite complicated and ADO.NET db data adapter may not be able to determine PK of a view. In such cases, we need to fail initialization and throw an exception.

How was this done?
Throw an exception when the primaryKeys list for a view is empty.

Comment thread DataGateway.Service/Services/MetadataProviders/SqlMetadataProvider.cs Outdated
Comment thread DataGateway.Service/Services/MetadataProviders/SqlMetadataProvider.cs Outdated
@Aniruddh25 Aniruddh Munde (Aniruddh25) linked an issue May 15, 2022 that may be closed by this pull request

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Need a different status code

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Please make sure to add -ve tests in a future PR.

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.

Sql: Fail Bootstrap if Primary key is not found

2 participants