RKazam is an DBI-compliant interface to the hypothetical Kazam database. It is intended to be used as boilerplate for new DBI backends.
Goals and non-goals
RKazam aims to:
- Give a new DBI backend a complete skeleton. One file per method under
R/, with the S4 classes, thesetMethod()calls and theNAMESPACEre-exports already in place. - Be copied rather than depended on. The repository is a GitHub template and the package is CC0-licensed, so a new driver can start from it without attribution or licence obligations.
- Run the full
DBItestsuite from the first commit.tests/testthat/builds aDBItest::make_context()and callsDBItest::test_all(), so the specification passes its verdict on every method as it is filled in. - Mark the work that is left. Unimplemented methods call
testthat::skip()with their own name, andTODOandFIXMEcomments sit where a real backend has to do something. - Track DBI itself.
DESCRIPTIONrequires DBI (>= 1.2.0) and takes the development version fromRemotes:, and the Arrow classes and generics are stubbed alongside the older ones.
It is explicitly not trying to:
- Talk to a database. Kazam is hypothetical,
KazamConnectionhas no slots, anddbConnect()returns an object that holds nothing. - Be a package you install and use. Its methods call
testthat::skip()instead of running a query, so it does no useful work until it has been copied and filled in. - Reimplement what DBI already provides. Where a working default exists, as for
dbQuoteIdentifier(),dbQuoteString()anddbGetInfo()on a result, the stub calls that default and is marked optional. - Show how to bind to a native database library. The comment in
dbFetch()points at r-dbi/RPostgres and r-dbi/odbc for the classes that grow a result of unknown length, rather than reproducing them here.