if (FALSE) { # requireNamespace("RSQLite", quietly = TRUE)
# Create a connector:
cnr <- new("DBIConnector",
.drv = RSQLite::SQLite(),
.conn_args = list(dbname = ":memory:")
)
cnr
# Establish a connection through this connector:
con <- dbConnect(cnr)
con
# Access the database through this connection:
dbGetQuery(con, "SELECT 1 AS a")
dbDisconnect(con)
}
Run the code above in your browser using DataLab