sql_quote function

Helper function for quoting sql elements.

Helper function for quoting sql elements.

If the quote character is present in the string, it will be doubled. NAs will be replaced with NULL.

sql_quote(x, quote)

Arguments

  • x: Character vector to escape.
  • quote: Single quoting character.

Examples

sql_quote("abc", "'") sql_quote("I've had a good day", "'") sql_quote(c("abc", NA), "'")
  • Maintainer: Hadley Wickham
  • License: MIT + file LICENSE
  • Last published: 2024-03-19