Skip to content

Commit

Permalink
Use index to get table name and schema rather than name because dbUnq…
Browse files Browse the repository at this point in the history
…uoteIdentifier() doesn't have component names since 1.2.0
  • Loading branch information
jarodmeng committed Dec 12, 2024
1 parent 020334d commit b724044
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/dbExistsTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ setMethod(
FROM information_schema.columns
WHERE
table_catalog = '", conn@catalog, "' AND
table_schema = '", ifelse(!"schema" %in% names(table_name), conn@schema, table_name["schema"]), "' AND
table_name = '", table_name["table"], "'
table_schema = '", ifelse(length(table_name) == 2L, table_name[1], conn@schema), "' AND
table_name = '", table_name[length(table_name)], "'
")
)
return((res$n > 0))
Expand Down

0 comments on commit b724044

Please sign in to comment.