Learn R Programming

timeseriesdb (version 1.0.0-1.1.2)

db_call_function: Helper to construct SQL function calls

Description

Calls function `schema`.`fname` with the given `args`, returning the result.

Usage

db_call_function(con, fname, args = NULL, schema = "timeseries")

Arguments

con

RPostgres connection object.

fname

character Name of the function to be called

args

list of function arguments. A single, unnested list.

schema

character name of the database schema. Defaults to 'timeseries'

Value

value of `dbGetQuery(con, "SELECT * FROM schema.fname($args)")$fname`

Details

Args may be named to enable postgres to decide which candidate to choose in case of overloaded functions. If any args are named, all of them must be.