Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

make.db.names-MySQLConnection-character-method

Make R/S-Plus identifiers into legal SQL identifiers


Description

These methods are straight-forward implementations of the corresponding generic functions.

Usage

## S4 method for signature 'MySQLConnection,character'
make.db.names(
  dbObj,
  snames,
  keywords = .SQL92Keywords,
  unique = TRUE,
  allow.keywords = TRUE,
  ...
)

## S4 method for signature 'MySQLConnection'
SQLKeywords(dbObj, ...)

## S4 method for signature 'MySQLConnection,character'
isSQLKeyword(
  dbObj,
  name,
  keywords = .MySQLKeywords,
  case = c("lower", "upper", "any")[3],
  ...
)

Arguments

dbObj

any MySQL object (e.g., MySQLDriver).

snames

a character vector of R/S-Plus identifiers (symbols) from which we need to make SQL identifiers.

keywords

a character vector with SQL keywords, by default it is .MySQLKeywords define in RMySQL. This may be overriden by users.

unique

logical describing whether the resulting set of SQL names should be unique. Its default is TRUE. Following the SQL 92 standard, uniqueness of SQL identifiers is determined regardless of whether letters are upper or lower case.

allow.keywords

logical describing whether SQL keywords should be allowed in the resulting set of SQL names. Its default is TRUE

...

Unused, needed for compatibility with generic.

name

a character vector of SQL identifiers we want to check against keywords from the DBMS.

case

a character string specifying whether to make the comparison as lower case, upper case, or any of the two. it defaults to any.


RMySQL

Database Interface and 'MySQL' Driver for R

v0.10.21
GPL-2
Authors
Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>), David James [aut], Saikat DebRoy [aut], Hadley Wickham [aut], Jeffrey Horner [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.