Skip to contents

Returns information about the relationships between tables in the database used by foosball3

Usage

foosball3_get_schema(con, include_views = FALSE, ...)

Arguments

con

A connection to a copy of a foosball3 database. Can be created with foosball3_create_db() or foosball3_import_db().

include_views

If TRUE it will include 'view' tables, otherwise it will exclude them. Default is FALSE

...

Ignored.

Value

A dm class object with relational information.

Examples

if (requireNamespace("dm")) {
  db_file <- tempfile(fileext = ".db")
  foosball3_create_db(db_file)
  con <- RSQLite::dbConnect(RSQLite::SQLite(), db_file)
  on.exit({
    RSQLite::dbDisconnect(con)
    unlink(db_file, TRUE, TRUE)
  }, add = TRUE)
  
  foosball3_get_schema(con, TRUE)
}
#> Loading required namespace: dm
#> ── Table source ────────────────────────────────────────────────────────────────
#> Error: Invalid or closed connection