sqlAssertPattern | R Documentation |
These functions can be used to format and check the input of queries.
sqlAssertPattern(x, pattern, negate = TRUE)
sqlAssertChar(x)
sqlAssertChars(x)
sqlAssertNum(x)
sqlAssertNums(x)
sqlAssertAlnum(x)
sqlAssertAlnums(x)
sqlParan(x, assert = identity)
sqlComma(x, assert = identity)
sqlEsc(x, assert = identity, with = "`")
sqlName(x)
sqlNames(x)
sqlInNums(x)
sqlInChars(x)
sqlInAlnums(x)
x |
(ANY) input |
pattern |
(character) a regular expression used in grepl |
negate |
(logical) if TRUE then an error is thrown if at least one of the elements in x match pattern. If FALSE all elements in x must match the pattern. |
assert |
(function) an assertion function |
with |
(character) |
# Will format and check:
sqlInChars(letters[1:2])
sqlInNums(1:2)
sqlNames(letters[1:2])
sqlName("a")
# Only check:
sqlAssertNum(1)
sqlAssertNums(1:2)
sqlAssertChar("a")
sqlAssertChars(letters[1:2])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.