Skip to contents

Opens a DuckDB database at db_path, creates the current schema when the file is empty, and otherwise requires the current version and fingerprint.

Usage

ledgr_db_init(db_path)

Arguments

db_path

Path to a DuckDB database file (or ":memory:").

Value

A DBI connection.

Examples

db_path <- tempfile(fileext = ".duckdb")
con <- ledgr_db_init(db_path)
ledgr_validate_schema(con)
DBI::dbDisconnect(con, shutdown = TRUE)