Skip to content

Commit

Permalink
Les autoreport fra db som tabell
Browse files Browse the repository at this point in the history
Fremdeles en del jobb som gjenstår...
  • Loading branch information
arnfinn committed Nov 29, 2024
1 parent 2fc560c commit 1036492
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/autoReport.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ readAutoReportData <- function(fileName = "autoReport.yml",
target <- config$r$autoReport$target

if (target == "db") {
# RMariaDB does not seem to handle json well, so cast to string serverside
query <- "SELECT CAST(j AS CHAR) AS j FROM autoreport;"
query <- "SELECT * FROM autoreport2;"
res <- rapbase::loadRegData(config$r$autoReport$key, query)
conf <- jsonlite::unserializeJSON(res$j)
print(res)
conf <- res
} else if (target == "file") {
path <- Sys.getenv("R_RAP_CONFIG_PATH")

Expand Down

0 comments on commit 1036492

Please sign in to comment.