mariadb-quoting: Quote MariaDB strings and identifiers.

mariadb-quotingR Documentation

Quote MariaDB strings and identifiers.

Description

In MariaDB, identifiers are enclosed in backticks, e.g. `x`.

Usage

## S4 method for signature 'MariaDBConnection,Id'
dbQuoteIdentifier(conn, x, ...)

## S4 method for signature 'MariaDBConnection,SQL'
dbQuoteIdentifier(conn, x, ...)

## S4 method for signature 'MariaDBConnection,character'
dbQuoteIdentifier(conn, x, ...)

## S4 method for signature 'MariaDBConnection'
dbQuoteLiteral(conn, x, ...)

## S4 method for signature 'MariaDBConnection,SQL'
dbQuoteString(conn, x, ...)

## S4 method for signature 'MariaDBConnection,character'
dbQuoteString(conn, x, ...)

## S4 method for signature 'MariaDBConnection,SQL'
dbUnquoteIdentifier(conn, x, ...)

Examples

if (mariadbHasDefault()) {
  con <- dbConnect(RMariaDB::MariaDB())
  dbQuoteIdentifier(con, c("a b", "a`b"))
  dbQuoteString(con, c("a b", "a'b"))
  dbDisconnect(con)
}

r-dbi/RMariaDB documentation built on Dec. 15, 2024, 12:12 p.m.