keyValueToSql: Generate SQL Filter or Assignment Expression

View source: R/sql.R

keyValueToSqlR Documentation

Generate SQL Filter or Assignment Expression

Description

Generate SQL Filter or Assignment Expression

Usage

keyValueToSql(cname, cvalue, like = TRUE, filter = TRUE)

Arguments

cname

field name

cvalue

field value

like

if TRUE, the SQL comparison operator will be LIKE instead of =.

filter

if TRUE an SQL filter expression is returned, otherwise an SQL assignment expression

Value

(vector of) character representing an SQL expression

Examples

cat(kwb.db:::keyValueToSql("age", 1))
cat(kwb.db:::keyValueToSql("name", "peter"))
cat(kwb.db:::keyValueToSql("name", "peter", like = FALSE))


KWB-R/kwb.db documentation built on Oct. 1, 2023, 4:10 a.m.