quoteText2: Add single quotes to strings using stringi::stri_join, useful...

View source: R/pgTools.R

quoteText2R Documentation

Add single quotes to strings using stringi::stri_join, useful for converting R strings into SQL formatted strings.

Description

Add single quotes to strings using stringi::stri_join, useful for converting R strings into SQL formatted strings.

Usage

quoteText2(x, char_only = TRUE, excluded_chars = c("NULL"))

Arguments

x

A string.

char_only

TRUE/FALSE, if TRUE, adds quotes only if is.character(x) is TRUE.

excluded_chars

A character vector, will not add quotes if a value is in excluded_chars.

Value

A string, with single quotes added to match PostgreSQL string formatting.

Examples

quoteText2("Sample quotes.")

pgTools documentation built on March 31, 2023, 7:56 p.m.

Related to quoteText2 in pgTools...