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

feat: Arrange the DBI::Id() object in SQL order #427

Merged
merged 6 commits into from
Dec 16, 2023
Merged

Conversation

eauleaf
Copy link
Contributor

@eauleaf eauleaf commented Dec 1, 2023

My package uses DBI::Id() to write out SQL via dbQuoteIdentifier(), but success or failure of the SQL statement depends on the order that users input the Id params. In my package, I overwrote the Id() function to create a similar DBI object, but this issue appears to have been a problem for others as well.

Changes correct my issue, which is identical to this closed issue:
r-dbi/odbc#214

Might fix this user's issue:
#426

Closes #383.

Might help with issue r-dbi#426:
"dbplyr 2.4.0- breaking changes r-dbi#426"

And my issue, which is similar to r-dbi#214:
"Name and schema in DBI::Id r-dbi#214"
Copy link
Contributor

aviator-app bot commented Dec 1, 2023

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged manually (without Aviator). Merging manually can negatively impact the performance of the queue. Consider using Aviator next time.


See the real-time status of this PR on the Aviator webapp.

Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@eauleaf eauleaf marked this pull request as draft December 1, 2023 01:14
@eauleaf eauleaf marked this pull request as ready for review December 1, 2023 01:43
Copy link
Member

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

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

Thanks!

tests/testthat/test-00-Id.R Outdated Show resolved Hide resolved
@krlmlr krlmlr requested a review from hadley December 2, 2023 08:55
Copy link
Member

@hadley hadley left a comment

Choose a reason for hiding this comment

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

Seems like a low-risk change to me.

@eauleaf in general it's easier to review PRs if you make the minimum set of changes to the existing package.

R/00-Id.R Outdated Show resolved Hide resolved
tests/testthat/test-00-Id.R Show resolved Hide resolved
Copy link
Contributor Author

@eauleaf eauleaf 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 the feedback. Per your comments, revised pull request to minimize changes and added another test.

@eauleaf eauleaf requested a review from krlmlr December 6, 2023 01:08
R/00-Id.R Outdated Show resolved Hide resolved
Co-authored-by: Hadley Wickham <[email protected]>
@krlmlr krlmlr changed the title Arrange the DBI::Id() object in SQL order feat: Arrange the DBI::Id() object in SQL order Dec 16, 2023
@krlmlr krlmlr merged commit bd1c796 into r-dbi:main Dec 16, 2023
15 checks passed
@krlmlr
Copy link
Member

krlmlr commented Dec 16, 2023

Nice, thanks!

@krlmlr
Copy link
Member

krlmlr commented Dec 16, 2023

@eauleaf: Would you like to help review #429?

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.

dbQuoteIdentifier() ignores names given to Id(), uses arguments in order
3 participants