Show history of queries loaded into a database collection
Source:R/dbQueryHistory.R
dbQueryHistory.Rd
Show history of queries loaded into a database collection
Arguments
- con
A database connection object, created with
nodbi
. See section `1 - Database connection` in ctrdata.- verbose
If
TRUE
, prints additional information (defaultFALSE
).
Value
A data frame (or tibble, if tibble
is loaded)
with columns: `query-timestamp`, `query-register`,
`query-records` (note: this is the number of records loaded when last
executing ctrLoadQueryIntoDb, not the total record number) and
`query-term`, with one row for each time that
ctrLoadQueryIntoDb loaded trial records into this collection.
Examples
dbc <- nodbi::src_sqlite(
dbname = system.file("extdata", "demo.sqlite", package = "ctrdata"),
collection = "my_trials",
RSQLite::SQLITE_RO)
#> RSQLite version has enabled accelerating docdb_create() and docdb_update() functions when used with value = <NDJSON file name>.
dbQueryHistory(con = dbc)
#> query-timestamp query-register query-records
#> 1 2024-05-16 14:05:23 EUCTR 5
#> 2 2024-05-16 14:06:43 CTGOV 8
#> 3 2024-05-16 14:07:32 ISRCTN 8
#> 4 2024-05-16 14:07:57 CTGOV2 5
#> 5 2024-06-23 16:14:56 CTIS 3
#> query-term
#> 1 query=&age=newborn&phase=phase-three&dateFrom=2015-02-28&dateTo=2015-03-31&status=completed
#> 2 term=AREA[MaximumAge]+RANGE[0+days,+28+days]&intr=Drugs,+Investigational&strd_s=01/01/2018&strd_e=01/01/2020&type=Intr&phase=2
#> 3 q=&filters=ageRange:Neonate,phase:Phase+III
#> 4 distance=50&cond=neuroblastoma&aggFilters=phase:2,results:with&primComp=2014-01-01_2014-12-31
#> 5 searchCriteria={"containAll":"infection","containAny":"neonates","containNot":""}