#' 检查对象是否存在
#'
#' @param FToken 口令
#' @param objectName 对象表
#'
#' @return 返回值
#' @export
#'
#' @examples
#' object_isNew()
object_isNew <-function(FToken ='9B6F803F-9D37-41A2-BDA0-70A7179AF0F3',objectName = 't_sec_log') {
conn <- sql_getConn(token=FToken)
sql <- paste0("select * from sys.objects where name = '",objectName,"' ")
data = tsda::sql_select(conn,sql)
ncount = nrow(data)
if(ncount >0){
res <- FALSE
}else{
res <- TRUE
}
return(res)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.