dbGetQueryEm: Results column names are always in UPPERCASE.

Description Usage Arguments Value Examples

Description

Thin wrapper over R CRAN package DBI function dbGetQuery

Usage

1
2
3
4
5
6
7
8
9
dbGetQueryEM(
  connName,
  Statement,
  time_zone = "UTC",
  client_encoding = "UTF8",
  env,
  display = TRUE,
  exec = TRUE
)

Arguments

connName

String. Default is "connEM". Contains the name of the variable that contains the name of the "connection" in the environment "env".

Statement

a character string containing SQL. The statement "SELECT 1;" will test if a database connection is non-expired or is-valid. Then, the returned value is either data.frame(DBISCONNECTEDEM = TRUE) or data.frame(DBISCONNECTEDEM = TRUE).

time_zone

Execution time zone. Default is "UTC".

client_encoding

Execution encoding. Default is "UTF8".

env

Environment. Default is the .Global environment. This is the environment to return the connection object "connEM".

display

Logical. Whether to display the query (defaults to TRUE).

exec

Logical. Whether to execute the query (defaults to TRUE).

Value

SQL results. Otherwise, an error is returned. The results column names are always in uppercase.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 

dbGetQueryEM(Statement = "SELECT 1 output;")

# Query executed:
# SELECT 1 output;
#   OUTPUT
# 1      1


## End(Not run)

AndreMikulec/econModel documentation built on June 30, 2021, 9:48 a.m.