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

Hotfix/2024 09 fixed result set get by name #289

Merged
merged 7 commits into from
Sep 9, 2024

Conversation

takapi327
Copy link
Owner

@takapi327 takapi327 commented Sep 9, 2024

Implementation Details

The process to retrieve records by matching the table name and column name, such as when using JOIN, does not work as intended.

sql"SELECT c.Id, c.Name, ct.Code, ct.Name FROM city AS c JOIN country AS ct ON c.CountryCode = ct.Code"
  .query[(Int, String, String, String)]

There is no problem in retrieving records by specifying the Index, but when retrieving records by specifying the column name internally, the records are not retrieved correctly because they are retrieved as Id instead of c.Id.

JDBC allows the retrieval of records by the combination of table name and column name, so the modification was made accordingly.

https://github.com/mysql/mysql-connector-j/blob/release/8.x/src/main/core-impl/java/com/mysql/cj/result/DefaultColumnDefinition.java#L204-L210

Fixes

Fixes #xxxxx

Pull Request Checklist

  • Wrote unit and integration tests
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code formatting by scalafmt (sbt scalafmtAll command execution)
  • Add copyright headers to new files

References

@takapi327 takapi327 added 🪲 bug Something isn't working ldbc:connector Addition and modification of functionality to Connector projects labels Sep 9, 2024
@takapi327 takapi327 added this to the 0.3.0 milestone Sep 9, 2024
@takapi327 takapi327 self-assigned this Sep 9, 2024
@takapi327 takapi327 merged commit 20529b2 into master Sep 9, 2024
25 checks passed
@takapi327 takapi327 deleted the hotfix/2024-09-Fixed-ResultSet-get-by-name branch September 9, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working ldbc:connector Addition and modification of functionality to Connector projects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant