use the sqlrender function for supported dialects

This commit is contained in:
Frank DeFalco 2022-10-11 17:22:14 -04:00
parent 31c7b54c2b
commit 4f65420456
4 changed files with 12 additions and 10 deletions

View File

@ -24,5 +24,5 @@ Suggests:
RSQLite,
withr
NeedsCompilation: no
RoxygenNote: 7.1.1
RoxygenNote: 7.2.1
Config/testthat/edition: 3

View File

@ -12,6 +12,7 @@ listSupportedVersions <- function() {
#' @export
listSupportedDialects <- function() {
supportedDialects <- c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server", "spark", "snowflake", "synapse")
sqlRenderSupportedDialects <- SqlRender::listSupportedDialects()
supportedDialects <- sqlRenderSupportedDialects$dialect
return(supportedDialects)
}

View File

@ -30,11 +30,11 @@ Dashboard.
}
\section{Functions}{
\itemize{
\item \code{createPrimaryKeys}: createPrimaryKeys Returns a string containing the OHDSQL for creation of primary keys in the OMOP CDM.
\item \code{createPrimaryKeys()}: createPrimaryKeys Returns a string containing the OHDSQL for creation of primary keys in the OMOP CDM.
\item \code{createForeignKeys()}: createForeignKeys Returns a string containing the OHDSQL for creation of foreign keys in the OMOP CDM.
\item \code{createForeignKeys}: createForeignKeys Returns a string containing the OHDSQL for creation of foreign keys in the OMOP CDM.
}}
\examples{
ddl <- createDdl("5.4")
pk <- createPrimaryKeys("5.4")

View File

@ -36,7 +36,8 @@ writeIndex(
)
}
\arguments{
\item{targetDialect}{The dialect of the target database. Choices are "oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server"}
\item{targetDialect}{The dialect of the target database. Choices are "oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server",
"spark", "snowflake", "synapse"}
\item{cdmVersion}{The version of the CDM you are creating, e.g. 5.3, 5.4}
@ -52,10 +53,10 @@ execution.
}
\section{Functions}{
\itemize{
\item \code{writePrimaryKeys}: writePrimaryKeys Write the SQL code that creates the primary keys to a file.
\item \code{writePrimaryKeys()}: writePrimaryKeys Write the SQL code that creates the primary keys to a file.
\item \code{writeForeignKeys}: writeForeignKeys Write the SQL code that creates the foreign keys to a file.
\item \code{writeForeignKeys()}: writeForeignKeys Write the SQL code that creates the foreign keys to a file.
\item \code{writeIndex()}: writeIndex Write the rendered and translated sql that creates recommended indexes to a file.
\item \code{writeIndex}: writeIndex Write the rendered and translated sql that creates recommended indexes to a file.
}}