getDBOption: Get a database connection option.

Description Usage Arguments Value Examples

Description

Note: we are moving away from global options to options in the DB handle.

Usage

1
getDBOption(db, optname, default, connection_options = list())

Arguments

db

database connection handle.

optname

character, single option name.

default

what to return if not set.

connection_options

name list of per connection options.

Value

option value

Examples

1
2
3
4
5
if(requireNamespace("DBI", quietly = TRUE) && requireNamespace("RSQLite", quietly = TRUE)) {
  my_db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
  print(getDBOption(my_db, "use_DBI_dbExecute"))
  DBI::dbDisconnect(my_db)
}

WinVector/rquery documentation built on Dec. 8, 2019, 3:51 a.m.