dbUnquoteIdentifier {DBI}R Documentation

Unquote identifiers

Description

Call this method to convert a SQL object created by dbQuoteIdentifier() back to a list of Id objects.

Methods in other packages

Usage

dbUnquoteIdentifier(conn, x, ...)

Arguments

conn

A subclass of DBIConnection, representing an active connection to an DBMS.

x

An SQL or Id object or character vector, or a list of such objects, to unquote.

...

Other arguments passed on to methods.

See Also

Other DBIResult generics: DBIResult-class, dbBind, dbClearResult, dbColumnInfo, dbFetch, dbGetInfo, dbGetRowCount, dbGetRowsAffected, dbGetStatement, dbHasCompleted, dbIsValid, dbQuoteIdentifier, dbQuoteLiteral, dbQuoteString

Examples

# Unquoting allows to understand the structure of a
# possibly complex quoted identifier
dbUnquoteIdentifier(
  ANSI(),
  SQL(c('"Schema"."Table"', '"UnqualifiedTable"'))
)

# The returned object is always a list,
# also for Id objects or lists thereof
dbUnquoteIdentifier(
  ANSI(),
  Id(schema = "Schema", table = "Table")
)

dbUnquoteIdentifier(
  ANSI(),
  list(Id(schema = "Schema", table = "Table"), Id(table = "UnqualifiedTable"))
)

# Lists of SQL objects can also be processed,
# but each component must be length 1
dbUnquoteIdentifier(
  ANSI(),
  list(SQL('"Schema"."Table"'), SQL('"UnqualifiedTable"'))
)

[Package DBI version 0.8 Index]