adbi {adbi}R Documentation

Adbi driver

Description

In order to open a database connection, DBI::dbConnect() dispatches on a driver object, which can be instantiated by calling adbi().

Usage

adbi(driver = NA_character_)

## S4 method for signature 'AdbiDriver'
dbConnect(drv, ..., bigint = NULL)

## S4 method for signature 'AdbiConnection'
dbDisconnect(conn, force = getOption("adbi.force_close_results", FALSE), ...)

Arguments

driver

A driver specification that can be evaluated (with no arguments) to give an adbcdrivermanager::adbc_driver(). See Details for more information.

drv

an object that inherits from DBIDriver, or an existing DBIConnection object (in order to clone an existing connection).

...

Extra arguments passed to dbConnect() are forwarded to adbcdrivermanager::adbc_database_init()

bigint

The R type that 64-bit integer types should be mapped to, default is bit64::integer64, if bit64 is installed and character otherwise

conn

A DBIConnection object, as returned by dbConnect().

force

Close open results when disconnecting

Details

To specify the type of adbc driver, adbi accepts as driver argument

As default, an adbcdrivermanager::adbc_driver_monkey() object is created.

Value

A connection object (S4 class AdbiCOnnection, inheriting from DBIConnection) is returned by dbConnect(), while dbDisconnect() returns TRUE invisibly.

Examples

adbi()
if (requireNamespace("adbcsqlite")) {
  adbi("adbcsqlite")
}
library(DBI)
con <- dbConnect(adbi())
dbIsValid(con)
dbDisconnect(con)
dbIsValid(con)

[Package adbi version 0.1.1 Index]