sql_identifier: Create SQL identifiers

View source: R/sql_identifier.R

sql_identifierR Documentation

Create SQL identifiers

Description

A simple wrapper around DBI::dbQuoteIdentifier(), see its documentation for more information.

Usage

sql_identifier(name, parse = FALSE)

Arguments

name

A string, DBI::SQL() or DBI::Id() object to quote as an identifier.

parse

boolean; whether to attempt to parse name into constituent parts. Only used if name is a character string.

Details

If name is an SQL string, it will be validated. If it fails the validation, the function will throw an error.

If name is a character string and parse = TRUE, then the function will attempt to parse it into constituent parts (⁠"db.schema.table" -> "db"."schema"."table"⁠). It will also be validated.

Value

A DBI::SQL() string properly identifying the desired object


pnacht/simplysql documentation built on Sept. 5, 2024, 8:46 p.m.