sql.where.code: Create a parametrized or escaped SQL WHERE clause from the...

View source: R/db_util.r

sql.where.codeR Documentation

Create a parametrized or escaped SQL WHERE clause from the provided parameters.

Description

Create a parametrized or escaped SQL WHERE clause from the provided parameters.

Usage

sql.where.code(
  db = NULL,
  params,
  where.in = FALSE,
  parametrized = !where.in,
  add.where = TRUE
)

Arguments

db

a database connection needed for correct escaping via glue_sql

params

a list of parameters assume that db fields have the same name and have to be equal to provided values.

where.in

Set true TRUE a member of params can be vector and return all rows that match an element. By default FALSE to generate more compact code.

add.where

If TRUE start with WHERE

paramertrized

shall the generated code use SQL parameters.


skranz/dbmisc documentation built on Oct. 15, 2022, 2:11 p.m.