Skip to contents

Creates an in-memory DuckDB connection and ATTACHes the codeminer database file as read-only. Writes to the database go through a short-lived direct connection that detaches/reattaches around the operation.

Usage

codeminer_connect(main = NULL)

Arguments

main

Path to the codeminer DuckDB database file. Defaults to the path from CODEMINER_DB_PATH env var or rappdirs::user_data_dir("codeminer").

Value

The DBI connection object, invisibly.

Details

If called with no arguments, uses the default database path from the CODEMINER_DB_PATH environment variable (or rappdirs default).