connect_database: Open connection to SQLite database

View source: R/rEHR_functions.R

connect_databaseR Documentation

Open connection to SQLite database

Description

Open connection to SQLite database

Usage

connect_database(dbname)

Arguments

dbname

Name of SQLite database on hard disk (including full file path relative to working directory)

Value

No return value, called to open a database connection.

Examples


## Connect to a database
aurum_extract <- connect_database(file.path(tempdir(), "temp.sqlite"))

## Check connection is open
inherits(aurum_extract, "DBIConnection")

## clean up
RSQLite::dbDisconnect(aurum_extract)
unlink(file.path(tempdir(), "temp.sqlite"))


rcprd documentation built on April 12, 2025, 1:57 a.m.