Functions repeat code regarding checking arguments, these could be moved into helpers to improve maintainability.
Example:
if (is.null(start_date)) {
start_date_query <- "True"
} else {
start_date <- check_date_time(start_date, "start_date")
start_date_query <- glue::glue_sql("log.datetime >= {start_date}", .con = connection)
}
# Check end_date
if (is.null(end_date)) {
end_date_query <- "True"
} else {
end_date <- check_date_time(end_date, "end_date")
end_date_query <- glue::glue_sql("log.datetime < {end_date}", .con = connection)
}
Not urgent.
Functions repeat code regarding checking arguments, these could be moved into helpers to improve maintainability.
Example:
Not urgent.