db-quote: SQL escaping/quoting generics

db-quoteR Documentation

SQL escaping/quoting generics

Description

These generics translate individual values into SQL. The core generics are DBI::dbQuoteIdentifier() and DBI::dbQuoteString for quoting identifiers and strings, but dbplyr needs additional tools for inserting logical, date, date-time, and raw values into queries.

Usage

sql_escape_logical(con, x)

sql_escape_date(con, x)

sql_escape_datetime(con, x)

sql_escape_raw(con, x)

See Also

Other generic: db-sql, db_connection_describe(), db_copy_to()

Examples

con <- simulate_dbi()
sql_escape_logical(con, c(TRUE, FALSE, NA))
sql_escape_date(con, Sys.Date())
sql_escape_date(con, Sys.time())
sql_escape_raw(con, charToRaw("hi"))

dbplyr documentation built on May 29, 2024, 6:19 a.m.