Skip to content

Conversation

@shrektan
Copy link
Contributor

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
Copy link
Collaborator

Ok I think that makes sense, thanks!

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.

[FR] glue_sql('... in ({v*})') should return in(NULL) when the input is zero length

2 participants