devel: setup for sql-like data generation

This commit is contained in:
2026-09-14 13:40:02 +03:00
parent 6a9535ffbb
commit 4a06d93e64
2 changed files with 28 additions and 3 deletions

View File

@@ -260,6 +260,16 @@ get_empty_data = function(type) {
if (type %in% c("number")) as.character(NA)
}
#' @export
#' @description
#' Функция возращает пустое значение для каждого типа формы
get_sql_format = function(type) {
if (type %in% c("text", "select_one", "select_multiple")) return("TEXT")
if (type %in% c("radio", "checkbox")) return("TEXT")
if (type %in% c("date")) return("REAL")
if (type %in% c("number")) return("TEXT")
}
#' @export
#' @description Function to update input forms (default variants only)
#' @param id - input form id;