diff --git a/NAMESPACE b/NAMESPACE index 53f4adb340..7e5d6c70e9 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -20,6 +20,7 @@ S3method(ui_nested_tabs,teal_modules) export("%>%") export(TealReportCard) export(as.teal_slices) +export(close_conn) export(ddl) export(ddl_run) export(example_module) @@ -30,6 +31,7 @@ export(landing_popup_module) export(module) export(modules) export(new_tdata) +export(open_conn) export(report_card_template) export(reporter_previewer_module) export(show_rcode_modal) diff --git a/R/ddl.R b/R/ddl.R index 8982171b0d..f96be97495 100644 --- a/R/ddl.R +++ b/R/ddl.R @@ -28,9 +28,6 @@ #' - `join_keys` (`JoinKeys`) object #' `...` can be handled automatically by [ddl_run()] but #' -#' @param join_keys (`JoinKeys`)\cr -#' object -#' #' @param input_mask (`list` named)\cr #' arguments to be substituted in the `code`. These #' argument are going to replace arguments set through @@ -162,9 +159,11 @@ submit_button_server <- function(id, ...) { } # todo: to remove ------------- +#' @export open_conn <- function(username, password) { if (password != "pass") stop("Invalid credentials. 'pass' is the password") else TRUE } +#' @export close_conn <- function(conn) { message("closed") return(NULL) diff --git a/man/ddl.Rd b/man/ddl.Rd index 51a00aa4f3..5cd1c214b5 100644 --- a/man/ddl.Rd +++ b/man/ddl.Rd @@ -6,7 +6,7 @@ \usage{ ddl( expr, - code, + code = character(0), ui = submit_button_ui, input_mask = list(), server = submit_button_server, @@ -42,7 +42,14 @@ returned code is still executable but secure.} evaluation and code masking process it is recommended to use \code{ddl_run}. Package provides universal \code{username_password_server} which runs \code{ddl_run} function, which returns \code{teal_data} object. -Details in the the example} +Details in the the example +\itemize{ +\item \code{code} (\code{character}, \code{language}) code to be executed and returned in \code{teal_data} object. +\item \code{input_mask} (\code{list} named) arguments to be substituted in the \code{code}. +\item \code{datanames} (\code{character}) names of the objects to be created from the code evaluation. +\item \code{join_keys} (\code{JoinKeys}) object +\code{...} can be handled automatically by \code{\link[=ddl_run]{ddl_run()}} but +}} \item{join_keys}{(\code{JoinKeys}) or a single (\code{JoinKeySet})\cr (optional) object with dataset column relationships used for joining. diff --git a/man/get_join_keys.Rd b/man/get_join_keys.Rd index 991c23e5fd..709499e4a3 100644 --- a/man/get_join_keys.Rd +++ b/man/get_join_keys.Rd @@ -1,21 +1,12 @@ % Generated by roxygen2: do not edit by hand -<<<<<<< % Please edit documentation in R/ddl.R, R/tdata.R \name{get_join_keys.ddl} \alias{get_join_keys.ddl} -======= -% Please edit documentation in R/tdata.R -\name{get_join_keys.tdata} ->>>>>>> \alias{get_join_keys.tdata} \title{Extract \code{JoinKeys} from \code{tdata}} \usage{ -<<<<<<< \method{get_join_keys}{ddl}(data) -======= - ->>>>>>> \method{get_join_keys}{tdata}(data) } \arguments{ diff --git a/man/submit_button_module.Rd b/man/submit_button_module.Rd index 65e69e47e7..a858017ba5 100644 --- a/man/submit_button_module.Rd +++ b/man/submit_button_module.Rd @@ -13,7 +13,7 @@ submit_button_server(id, ...) \arguments{ \item{id}{(\code{character}) \code{shiny} module id.} -\item{x}{(\code{ddl}) object} +\item{...}{(\code{list}) arguments passed to \code{ddl_run} function.} } \value{ \code{shiny} module