Skip to content

Conversation

gamewizzzz
Copy link
Contributor

Why make this change?

What is this change?

  • These changes impact API builder startup. The query output has not been modified, but certain field references are capitalized.
  • The proper case is used to avoid "field not found" and "key field not found" errors when the database collation is case-sensitive.

How was this tested?

  • Integration Tests - Ran locally; about 5 tests failed, but it was the same ones that failed before modifications
  • Unit Tests

Sample Request(s)

  • N/A

Modified metadata queries to use proper case to avoid "field not found" errors whether database collation is sensitive or not
@gamewizzzz
Copy link
Contributor Author

@microsoft-github-policy-service agree

@severussundar
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

Copy link
Contributor

@seantleonard seantleonard left a comment

Choose a reason for hiding this comment

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

thank you for making these changes to enable compat with case sensitive db collations! few things to update then should be good to go.

gamewizzzz and others added 4 commits December 14, 2023 22:27
Co-authored-by: Sean Leonard <sean.leonard@microsoft.com>
Co-authored-by: Sean Leonard <sean.leonard@microsoft.com>
Co-authored-by: Sean Leonard <sean.leonard@microsoft.com>
Co-authored-by: Sean Leonard <sean.leonard@microsoft.com>
@gamewizzzz
Copy link
Contributor Author

Code change suggestions reviewed and accepted. Thanks for the heads up on the tab characters.

@abhishekkumams
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

Copy link
Contributor

@seantleonard seantleonard left a comment

Choose a reason for hiding this comment

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

thanks for making these changes!

@seantleonard
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@Aniruddh25
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@Aniruddh25
Copy link
Collaborator

Aniruddh25 commented Mar 1, 2024

@gamewizzzz, the MySQL/PgSQL tests are failing since their query builders need to be updated as well.

Could you please fix it in this function:

public string BuildQueryToGetReadOnlyColumns(string schemaParamName, string tableParamName)

@EHekkert
Copy link

@gamewizzzz, are you still working on this?

@gamewizzzz
Copy link
Contributor Author

gamewizzzz commented Jun 19, 2024 via email

@sander1095
Copy link
Contributor

Hi @Aniruddh25 . Any help from the DAB team to finish this PR?

@Aniruddh25
Copy link
Collaborator

/azp run

@Aniruddh25
Copy link
Collaborator

Hi @Aniruddh25 . Any help from the DAB team to finish this PR?

@sander1095 - yes, we will take it forward and merge this.

@aaronburtle
Copy link
Contributor

/azp run

1 similar comment
@RubenCerna2079
Copy link
Contributor

/azp run

@RubenCerna2079
Copy link
Contributor

/azp run

@gamewizzzz
Copy link
Contributor Author

gamewizzzz commented Jul 24, 2024 via email

@aaronburtle
Copy link
Contributor

aaronburtle commented Jul 24, 2024

The example you reference in "image.png" shows double quotes

I probably wasn't clear enough, but I am referencing the hard coded and escaped double quotes around COLUMN_NAME, typically if we are quoting parts of the sql statements we use a helper function, or leave the quotes out, or in some cases I think we have single quotes. Just want to align this with the rest of the code.

I should have mentioned the helper function but it slipped my mind and I was confused why we had escaped double quotes there.

@RubenCerna2079
Copy link
Contributor

/azp run

2 similar comments
@aaronburtle
Copy link
Contributor

/azp run

@RubenCerna2079
Copy link
Contributor

/azp run

Copy link
Contributor

@aaronburtle aaronburtle left a comment

Choose a reason for hiding this comment

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

LGTM!

@RubenCerna2079 RubenCerna2079 merged commit 6ebabab into Azure:main Jul 25, 2024
seantleonard added a commit that referenced this pull request Aug 5, 2024
## Why make this change?

- Resolves #1896

## What is this change?

- These changes impact API builder startup. The query output has not
been modified, but certain field references are capitalized.
- The proper case is used to avoid "field not found" and "key field not
found" errors when the database collation is case-sensitive.

## How was this tested?

- [x] Integration Tests - Ran locally; about 5 tests failed, but it was
the same ones that failed before modifications
- [ ] Unit Tests

## Sample Request(s)
- N/A

---------

Co-authored-by: Sean Leonard <sean.leonard@microsoft.com>
Co-authored-by: Aniruddh Munde <anmunde@microsoft.com>
Co-authored-by: RubenCerna2079 <32799214+RubenCerna2079@users.noreply.github.com>
Co-authored-by: Ruben Cerna <rcernaserna@microsoft.com>
seantleonard added a commit that referenced this pull request Aug 8, 2024
## Port metadata

- Porting from `main` to `release/1.2`
  - Issue: #1896 
  - PR: #1921

## Why make this change?

- Resolves #1896

## What is this change?

- These changes impact API builder startup. The query output has not
been modified, but certain field references are capitalized.
- The proper case is used to avoid "field not found" and "key field not
found" errors when the database collation is case-sensitive.

## How was this tested?

- [x] Integration Tests - Ran locally; about 5 tests failed, but it was
the same ones that failed before modifications
- [ ] Unit Tests

## Sample Request(s)
- N/A

Co-authored-by: gamewizzzz <gamewizzzz@gmail.com>
Co-authored-by: Aniruddh Munde <anmunde@microsoft.com>
Co-authored-by: RubenCerna2079 <32799214+RubenCerna2079@users.noreply.github.com>
Co-authored-by: Ruben Cerna <rcernaserna@microsoft.com>
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.

[Bug]: Builder Not Working For MSSQL Databases With Case Sensitive Collation (Azure.DataApiBuilder.Core.Resolvers.QueryExecutor)
9 participants