R/add_app.R

Defines functions add_app

Documented in add_app

#' add_app
#'
#' @param conn the database connection
#' @param app_name the name of the app
#' @param account_uid the account uid
#' @param schema the name of the database schema
#'
#' @export
#'
#' @importFrom pool dbExecute
#'
add_app <- function(conn, app_name, account_uid, schema = "polished") {

  pool::dbExecute(
    conn,
    paste0("INSERT INTO ", schema, ".apps ( app_name, account_uid ) VALUES ( $1, $2 )"),
    params = list(
      app_name,
      account_uid
    )
  )
}
Tychobra/polishedapi documentation built on July 19, 2020, 11:41 p.m.