Skip to content

Commit 579810d

Browse files
committed
Added to QueryNamespace factory
1 parent e22d0b2 commit 579810d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/QueryNamespace.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ QueryNamespace <- R6::R6Class(
308308
#' @param connectionHandler ResultModelManager ConnectionHandler or PooledConnectionHandler instance
309309
#' @param tableSpecification Table specfication data.frame
310310
#' @param snakeCaseToCamelCase convert snakecase results to camelCase field names (TRUE by default)
311+
#' @param queryOptions (Optional) Active field. Named list of options that are wrapped when queries are translated. For example `list(sqlRenderTempSchema = 'my_scratch_space')`. Will override default global behaviour without altering global option state
311312
#' @param ... Elipsis - use for any additional string keys to replace
312313
createQueryNamespace <- function(connectionDetails = NULL,
313314
connectionHandler = NULL,
@@ -316,6 +317,7 @@ createQueryNamespace <- function(connectionDetails = NULL,
316317
resultModelSpecificationPath = NULL,
317318
tablePrefix = "",
318319
snakeCaseToCamelCase = TRUE,
320+
queryOptions = list(),
319321
...) {
320322
checkmate::assertClass(connectionDetails, "ConnectionDetails", null.ok = TRUE)
321323
checkmate::assertClass(connectionHandler, "ConnectionHandler", null.ok = TRUE)
@@ -352,7 +354,7 @@ createQueryNamespace <- function(connectionDetails = NULL,
352354
}
353355
}
354356
connectionHandler$snakeCaseToCamelCase <- snakeCaseToCamelCase
355-
357+
connectionHandler$queryOptions <- queryOptions
356358
qns <- QueryNamespace$new(connectionHandler,
357359
tableSpecification = tableSpecification,
358360
tablePrefix = tablePrefix,

0 commit comments

Comments
 (0)