Skip to content

Commit

Permalink
add createExecutionSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlavallee92 committed Oct 24, 2024
1 parent 8be0478 commit 3c923f0
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions R/executionSettings.R
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,34 @@ ExecutionSettings <- R6::R6Class(

)
)


#' @title
#' Create an ExecutionSettings object and set its attributes
#'
#' @param connectionDetails A DatabaseConnector connectionDetails object (optional if connection is specified)
#' @param connection A DatabaseConnector connection object (optional if connectionDetails is specified)
#' @param cdmDatabaseSchema The schema of the OMOP CDM database
#' @param workDatabaseSchema The schema to which results will be written
#' @param tempEmulationSchema Some database platforms like Oracle and Snowflake do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.
#' @param targetCohortTable The name of the table where the target cohort(s) are stored
#' @param cdmSourceName A human-readable name for the OMOP CDM source
#'
#' @return An ExecutionSettings object
#' @export
createExecutionSettings <- function(connectionDetails,
connection = NULL,
cdmDatabaseSchema,
workDatabaseSchema,
tempEmulationSchema,
targetCohortTable,
cdmSourceName) {
executionSettings <- ExecutionSettings$new(connectionDetails = connectionDetails,
connection = connection,
cdmDatabaseSchema = cdmDatabaseSchema,
workDatabaseSchema = workDatabaseSchema,
tempEmulationSchema = tempEmulationSchema,
targetCohortTable = targetCohortTable,
cdmSourceName = cdmSourceName)
return(executionSettings)
}

0 comments on commit 3c923f0

Please sign in to comment.