-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
As per DBI specification a backend may allow for "special values" to be passed as n in dbFetch():
n maximum number of records to retrieve per fetch. Use n = -1 or n = Inf to retrieve all pending records. Some implementations may recognize other special values.
Such a "special value" might for example be NA. Yet, there are tests that disallow this:
Lines 54 to 64 in 2c29217
| fetch_n_bad = function(con) { | |
| #' If the `n` argument is not an atomic whole number | |
| #' greater or equal to -1 or Inf, an error is raised, | |
| query <- trivial_query() | |
| res <- local_result(dbSendQuery(con, query)) | |
| expect_error(dbFetch(res, -2)) | |
| expect_error(dbFetch(res, 1.5)) | |
| expect_error(dbFetch(res, integer())) | |
| expect_error(dbFetch(res, 1:3)) | |
| expect_error(dbFetch(res, NA_integer_)) | |
| }, |
Generally, such tests should probably be removed. If the specification is narrowed down a bit (to scalar values for examples), some tests may remain.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels