Skip to content

Commit d146fee

Browse files
perf: Avoid unnecessary computation in default dbUnquoteIdentifier() method (#515)
1 parent 9d28b2a commit d146fee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

R/dbUnquoteIdentifier_DBIConnection.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#' @rdname hidden_aliases
22
#' @usage NULL
33
dbUnquoteIdentifier_DBIConnection <- function(conn, x, ...) {
4-
# Determine quoting character
5-
quote_char <- substr(dbQuoteIdentifier(conn, ""), 1, 1)
6-
74
if (is(x, "SQL") || is.character(x)) {
85
if (is.character(x)) {
96
stopifnot(!anyNA(x))
107
}
8+
# Determine quoting character
9+
quote_char <- substr(dbQuoteIdentifier(conn, ""), 1L, 1L)
1110
x <- lapply(x, unquote, quote_char = quote_char)
1211
lapply(x, Id)
1312
} else if (is(x, "Id")) {

0 commit comments

Comments
 (0)