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

`glue_sql()` now collapses zero-length vector into `DBI::SQL("NULL")` #134

Merged
merged 1 commit into from Apr 15, 2019

Conversation

@shrektan
Copy link
Contributor

commented Apr 13, 2019

Closes #133

Example Code

con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
sql <- 'select * from tbl where values in ({v*})'
v <- character()
glue_sql(sql, .con = con)
  • Before it returns an empty SQL: <SQL>
  • Now it returns a valid SQL: <SQL> select * from tbl where values in (NULL)
@jimhester

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

Ok I think that makes sense, thanks!

@jimhester jimhester merged commit b35f0fe into tidyverse:master Apr 15, 2019

4 checks passed

codecov/patch 100% of diff hit (target 99.71%)
Details
codecov/project 99.71% (+<.01%) compared to f356a12
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@shrektan shrektan deleted the shrektan:fix133 branch Apr 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.