Database Connection Management and Utilities for 'dbverse'

Provides an R6-based project container for managing 'DuckDB' connections, reconnecting lazy database tables after session restarts, and storing metadata for database-backed objects used by packages in the 'dbverse'. The package supplies S4 base classes and generics for database-backed data, helpers for validating 'DuckDB' connections and table names, utilities for creating persistent database views, and methods for writing and restoring pinned lazy tables through the 'pins' package. These tools help package authors and analysts keep database paths, cached connections, and table references synchronized across interactive sessions and project directories.


dbProject

Lifecycle:experimental CRANstatus

The goal of dbProject is to manage dbData objects and database connections in the dbverse ecosystem.

Installation

You can install the development version of dbProject like so:

pak::pak("dbverse-org/dbproject-r")

Example

This is a basic example which shows you how to solve a common problem:

library(dbProject)

project_dir <- tempfile("dbproject_demo")
project <- dbProject$new(path = project_dir)
con <- project$get_conn()

DBI::dbWriteTable(con, "mtcars", mtcars)
DBI::dbReadTable(con, "mtcars")

project$disconnect()
unlink(project_dir, recursive = TRUE)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("dbProject")

0.1.1 by Edward C. Ruiz, 4 months ago


https://github.com/dbverse-org/dbproject-r, https://dbverse-org.github.io/dbproject-r/


Report a bug at https://github.com/dbverse-org/dbproject-r/issues


Browse source code at https://github.com/cran/dbProject


Authors: Edward C. Ruiz [aut, cre] (ORCID: , Jiaji George Chen [aut] , Ruben Dries [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports dplyr, duckdb, DBI, pins, dbplyr, methods, glue, cli, R6, connections, yaml

Suggests knitr, rmarkdown, withr, testthat, dbMatrix


Imported by dbMatrix, dbSpatial.


See at CRAN