db_call_function: Helper to construct SQL function calls

View source: R/utils.R

db_call_functionR Documentation

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'

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.

Value

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


timeseriesdb documentation built on March 24, 2022, 1:06 a.m.