sql_expr

0th

Percentile

Generate SQL from R expressions

Low-level building block for generating SQL from R expressions. Strings are escaped; names become bare SQL identifiers. User infix functions have \% stripped.

Usage
sql_expr(x, con = sql_current_con())
Arguments
x

A quasiquoted expression

con

An optional database connection to control the details of the translation. The default, NULL, generates ANSI SQL.

Aliases
  • sql_expr
Examples
# NOT RUN {
sql_expr(f(x + 1))

sql_expr(f("x", "y"))
sql_expr(f(x, y))

sql_expr(cast("x" %as% DECIMAL))
sql_expr(round(x) %::% numeric)
# }
Documentation reproduced from package dbplyr, version 1.2.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.