Description Usage Arguments Examples
If you're implementing a backend that uses non-ANSI quoting or commenting
rules, you'll need to implement a method for sqlParseVariables
that
calls sqlParseVariablesImpl
with the appropriate quote and
comment specifications.
1 2 3 4 5 6 7 8 9 10 | sqlParseVariables(con, sql, ...)
## S4 method for signature 'DBIConnection'
sqlParseVariables(con, sql, ...)
CommentSpec(start, end, endRequired)
QuoteSpec(start, end, escape = "", doubleEscape = TRUE)
sqlParseVariablesImpl(sql, quotes, comments)
|
sql |
SQL to parse (a character vector of length 1) |
start,end |
Start and end characters for quotes and comments |
endRequired |
Is the ending character of a comment required? |
escape |
What character can be used to escape quoting characters?
Defaults to |
doubleEscape |
Can quoting characters be escaped by doubling them?
Defaults to |
quotes |
A list of |
comments |
A list of |
1 2 3 4 5 6 7 8 9 10 11 | # Use [] for quoting and no comments
sqlParseVariablesImpl("[?a]",
list(QuoteSpec("[", "]", "\\", FALSE)),
list()
)
# Standard quotes, use # for commenting
sqlParseVariablesImpl("# ?a\n?b",
list(QuoteSpec("'", "'"), QuoteSpec('"', '"')),
list(CommentSpec("#", "\n", FALSE))
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.