Show history of queries loaded into a database collection
Arguments
- con
A connection object, see section `Databases` in ctrdata-package
- verbose
If
TRUE
, prints additional information (defaultFALSE
).
Value
A data frame (or tibble, if dplyr
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 ctrLoadQueryIntoDb
loaded trial records into this collection.
Examples
dbc <- nodbi::src_sqlite(
dbname = system.file("extdata", "demo.sqlite", package = "ctrdata"),
collection = "my_trials")
dbQueryHistory(con = dbc)
#> query-timestamp query-register query-records
#> 1 2022-11-07 18:24:05 EUCTR 29
#> 2 2022-11-07 18:24:26 CTGOV 34
#> 3 2022-11-07 18:24:31 ISRCTN 8
#> query-term
#> 1 query=&age=newborn&phase=phase-three&dateFrom=2015-02-15&dateTo=2015-03-31
#> 2 term=AREA[MaximumAge]+RANGE[0+days,+28+days]&intr=Drugs,+Investigational&strd_s=01/01/2010&strd_e=01/01/2018&type=Intr&phase=2&Search=Apply
#> 3 q=&filters=ageRange:Neonate,phase:Phase+III