R/mod_funcoes.R

Defines functions mod_funcoes_server mod_funcoes_ui

#' funcoes UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd 
#'
#' @importFrom shiny NS tagList 
mod_funcoes_ui <- function(id){
  ns <- NS(id)
  tagList(
 
  )
}
    
#' funcoes Server Function
#'
#' @noRd 
mod_funcoes_server <- function(input, output, session, bd, caminho){
  ns <- session$ns
  
  return(
    
    if(bd == "bd"){
      
      RSQLite::dbConnect(SQLite(), dbname = paste0(caminho, "\\", "banco_de_dados.sqlite"))
      
    }else if(bd == "CAGED"){
      
      RSQLite::dbConnect(SQLite(), dbname = paste0(caminho, "\\", "CAGED.sqlite"))
      
    }else if(bd == "RAIS"){
      
      RSQLite::dbConnect(SQLite(), dbname = paste0(caminho, "\\", "RAIS.sqlite"))
      
    }
    
  )
  
  
 
}
    
## To be copied in the UI
# mod_funcoes_ui("funcoes_ui_1")
    
## To be copied in the server
# callModule(mod_funcoes_server, "funcoes_ui_1")
 
leandro-vento/projeto documentation built on April 10, 2021, 6:43 p.m.