Fixed lintr & complexity issues

This commit is contained in:
2026-02-03 14:50:30 +00:00
parent 14e58ed9da
commit b9378c3ae7
9 changed files with 44 additions and 42 deletions

View File

@@ -10,7 +10,7 @@
)
}
return(tbl)
tbl
}
@@ -40,7 +40,7 @@ insertRows <- function(table_name, rows, key_name = NULL) {
return(dbplyr::get_returned_rows(tbl))
}
return(invisible(tbl))
invisible(tbl)
}
appendRows <- function(table_name, rows, key_name = NULL) {
@@ -64,7 +64,7 @@ appendRows <- function(table_name, rows, key_name = NULL) {
return(dbplyr::get_returned_rows(tbl))
}
return(invisible(TRUE))
invisible(TRUE)
}
upsertRows <- function(table_name, rows, key_name = NULL) {
@@ -98,7 +98,7 @@ upsertRows <- function(table_name, rows, key_name = NULL) {
}
}
return(invisible(TRUE))
invisible(TRUE)
}
updateRows <- function(table_name, rows, key_name = NULL) {
@@ -122,7 +122,7 @@ updateRows <- function(table_name, rows, key_name = NULL) {
return(dbplyr::get_returned_rows(tbl))
}
return(invisible(TRUE))
invisible(TRUE)
}
deleteRows <- function(table_name, rows, key_name = NULL) {
@@ -151,5 +151,5 @@ deleteRows <- function(table_name, rows, key_name = NULL) {
return(dbplyr::get_returned_rows(tbl))
}
return(invisible(TRUE))
invisible(TRUE)
}

View File

@@ -9,13 +9,13 @@ NULL
withSchema <- function(table_name) {
config <- private$conn$getConfiguration()
if (exists("schema", config)) {
return(DBI::dbQuoteIdentifier(
DBI::dbQuoteIdentifier(
private$getDBConn(), DBI::Id(schema = config$schema, table = table_name)
))
)
} else {
return(DBI::dbQuoteIdentifier(
DBI::dbQuoteIdentifier(
private$getDBConn(), DBI::Id(table = table_name)
))
)
}
}
@@ -32,8 +32,8 @@ NULL
dplyrWithSchema <- function(table_name) {
config <- private$conn$getConfiguration()
if (exists("schema", config) && !is.null(config$schema)) {
return(dbplyr::in_schema(config$schema, table_name))
dbplyr::in_schema(config$schema, table_name)
} else {
return(table_name)
table_name
}
}

View File

@@ -33,6 +33,7 @@ names(member_list) <- member_names
NULL
#' @export
# nolint next: object_name_linter. R6Class
DBClient <- R6::R6Class(
"DBClient",
public = fn_list,

View File

@@ -48,7 +48,7 @@ connect <- function() {
error = function(err) {
print("Database error:")
utils::str(err)
return(FALSE)
FALSE
}
)

View File

@@ -34,6 +34,7 @@ names(member_list) <- member_names
NULL
#' @export
# nolint next: object_name_linter. R6Class
DBConnection <- R6::R6Class(
"DBConnection",
public = fn_list,