dbConnectSQLiteWithSchema: Creates a connection to an SQLite database and sets the...

View source: R/db_util.r

dbConnectSQLiteWithSchemaR Documentation

Creates a connection to an SQLite database and sets the specified schema

Description

The schema is added as attribute to the connection object and is automatically used by dbInsert, dbGet, and dbUpdate.

Usage

dbConnectSQLiteWithSchema(
  dbname,
  schema.file = paste0(tools::file_path_sans_ext(dbname), ".yaml"),
  schema = load.and.init.schemas(schema.file)
)

Arguments

dbname

Filename of the SQLite database

schema.file

YAML file that contains the database schema. By default it is assumed to be in the same folder as the database with the same name but the extension ".yaml"

schema

If you already loaded a schema file manually with load.and.init.schemas, you can also provide it here instead of specifying a schema.file.


skranz/dbmisc documentation built on Oct. 15, 2022, 2:11 p.m.