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

get_query_n_bad should use named parameter to dbGetQuery #177

Closed
hannes opened this issue Mar 12, 2019 · 2 comments
Closed

get_query_n_bad should use named parameter to dbGetQuery #177

hannes opened this issue Mar 12, 2019 · 2 comments

Comments

@hannes
Copy link

hannes commented Mar 12, 2019

get_query_n_bad calls dbGetQuery(con, query, -2) etc. However, in DBI the definition of dbGetQuery is function(conn, statement, ..., n = -1L) {. Hence, n is never modified for the default implementation.

@krlmlr
Copy link
Member

krlmlr commented Mar 17, 2019

Thanks. In the dev version, I see:

get_query_n_bad = function(ctx) {
with_connection({
query <- trivial_query()
expect_error(dbGetQuery(con, query, n = -2))
expect_error(dbGetQuery(con, query, n = 1.5))
expect_error(dbGetQuery(con, query, n = integer()))
expect_error(dbGetQuery(con, query, n = 1:3))
expect_error(dbGetQuery(con, query, n = NA_integer_))
})
},

@krlmlr krlmlr closed this as completed Dec 15, 2019
@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants