Skip to content

r-dbi/dbi3

Repository files navigation

dbi3

Lifecycle: experimental CRAN status

The goal of this repository is to design a new database interface from scratch, based on the lessons learned from DBI and the previous R Consortium projects. The interface provides compatibility to DBI in both directions: the new interface supports existing DBI backends (possibly with degraded performance), and backends implemented against the new interface automatically support DBI. Backends for the new interface will be easier to implement, because they can use the full feature set provided by dbi3.

In the beginning, the issue tracker will be used to collect and categorize issues that did not fit the scope of {DBI} or related packages. Eventually, the repository will contain a working package and a design document.

Properties

  • async-first
    • required for efficient web applications: Shiny and Plumber
    • simpler to implement a synchronous interface from an async interface than the other way round
  • only pure functions/methods with callbacks
    • idiomatic to R
  • agnostic to query language
    • concepts: context, connection, query objects, tables, query strings, parameters
  • reference implementation: generic backend for DBI classic

Issues and solutions

The following list of issues, collected 2024-04-14, were categorized by how (and where) they can be solved, taking into account the new ADBC standard and the new adbi package.

Solved by ADBC: Performance

Solved by ADBC: Data format

Solved by ADBC: Usability

To be solved by ADBC/Arrow: Usability

Interface: wrapper around adbcdrivermanager?

Quoting: dbplyr?

SQL generation: dbplyr?

Introspection: dm?

Interface: maintenance

Documentation: maintenance

Testing: maintenance

Parameterized queries: unclear, are they necessary for data analysis?

Reconnection: unclear, long-lived or serializable connections seem a specialized use case?

Out of scope?