readwritesqlite (version 0.0.1)

check_sqlite_connection: Check SQLite Connection

Description

Checks whether an R object is a SQLite Connection.

Usage

check_sqlite_connection(x, connected = NA, x_name = substitute(x),
  error = TRUE)

Arguments

x

The object to check.

connected

A flag specifying whether x should be connected.

x_name

A string of the name of the object.

error

A flag indicating whether to throw an informative error or immediately generate an informative message if the check fails.

Value

An invisible copy of the original object.

Examples

Run this code
# NOT RUN {
conn <- rws_connect()
check_sqlite_connection(conn)
rws_disconnect(conn)
check_sqlite_connection(conn, error = FALSE)
check_sqlite_connection(conn, connected = TRUE, error = FALSE)
# }

Run the code above in your browser using DataLab