retrieve_tables: Retrieve Database Tables

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Places all tables from the database connection in a list. This makes use of the tables in dplyr extremely easy.

Usage

1

Arguments

connection

an sql connection

Value

a list containing pointers to tables within the sql connection.

Examples

1
2
3
4
5
6
db_pth <- system.file("testdata/synthetic_db.sqlite3", package = "inspectEHR")
ctn <- connect(sqlite_file = db_pth)
core <- make_core(ctn)
tbls <- retrieve_tables(ctn)
tbls[["events"]] # the events table
DBI::dbDisconnect(ctn)

CC-HIC/inspectEHR documentation built on Jan. 16, 2020, 11:24 p.m.