R/mg_col_names.R

Defines functions mg_col_names

Documented in mg_col_names

#' Return column names of a mongo DB table (collection).
#'
#' @name mg_col_names
#'
#' @param table name (as character).
#'
#' @return character
mg_col_names <- function(table) {
  mongolite::mongo(table)$find(limit = 1) %>%  names()
}
Cronbach-GmbH/mgdbs documentation built on Dec. 17, 2021, 3:08 p.m.