getTaskFirstRunId {openMpp} | R Documentation |
Return first id of modeling task run
getTaskFirstRunId(dbCon, taskId)
dbCon |
database connection |
taskId |
modeling task id |
Return id of the first run for modeling task, it is positive integer. If there is no run(s) for that modeling task then return negative value.
Task run id: positive integer on success or negative on if not found.
To run examples you must have modelOne database modelOne.sqlite in current directory
amc1999
OpenM++ documentation: https://github.com/openmpp/openmpp.github.io/wiki
getTaskLastRunId
getModel
getWorksetRunIds
theDb <- dbConnect(RSQLite::SQLite(), "modelOne.sqlite", synchronous = "full") invisible(dbGetQuery(theDb, "PRAGMA busy_timeout = 86400")) # recommended # get model by name: use such call if you have only one version of the model defRs <- getModel(theDb, "modelOne") # get task id of "taskOne" taskId <- getTaskIdByName(theDb, defRs, "taskOne") if (firstId <= 0L) warning("task run(s) not found, task id: ", taskId) # get first task run id firstId <- getTaskFirstRunId(theDb, taskId) if (firstId <= 0L) stop("task run(s) not found") # get last (most recent) task run id lastId <- getTaskLastRunId(theDb, taskId) if (lastId <= 0L) warning("task run(s) not found") dbDisconnect(theDb)