-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
Lines 66 to 69 in f19fb4d
| random_table_name <- function(n = 10) { | |
| # FIXME: Use parallel-safe sequence of numbers | |
| paste0("dbit", paste(sample(letters, n, replace = TRUE), collapse = "")) | |
| } |
For us, CREATE TABLE abcdefg is not allowed -- all tables must be qualified as part of a namespace.
We already have tweaks$create_table_as to handle this, but it does not cover all the places where CREATE TABLE statements are attempted, e.g.
Lines 87 to 97 in f19fb4d
| fetch_no_return_value = function(con, table_name) { | |
| #' | |
| #' Calling `dbFetch()` on a result set from a data manipulation query | |
| #' created by [dbSendStatement()] can | |
| #' be fetched and return an empty data frame, with a warning. | |
| query <- paste0("CREATE TABLE ", table_name, " (a integer)") | |
| res <- local_result(dbSendStatement(con, query)) | |
| expect_warning(rows <- check_df(dbFetch(res))) | |
| expect_identical(rows, data.frame()) | |
| }, |
I think having tweaks$random_table_name() instead would be a better/more general solution.
Does that sound right? How does one edit the set of tweaks, exactly?
Metadata
Metadata
Assignees
Labels
No labels