prep_sql_query: Prepare an API query with SQL.

View source: R/prep_queries.R

prep_sql_queryR Documentation

Prepare an API query with SQL.

Description

Prepare an API query with SQL.

Usage

prep_sql_query(resource, fields, limit, offset, where)

Arguments

resource

a character string specifying resource id of the data set to be returned.

fields

a character vector specifying the names of fields to be included in the returned data.

limit

A numeric value specifying the maximum number of rows to be returned.

offset

A numeric value specifying the number of rows to skip.

where

A character string containing the 'WHERE' element of a simple SQL SELECT style query. Field names must be double quoted ("}), non numeric values must be single quoted (\code{"), and both single and double quotes must be delimited. Example; where = "\"AgeGroup\" = \'45-49 years\'".

Value

A character string containing the prepared query.


odns documentation built on Nov. 10, 2022, 5:56 p.m.