Skip to content

Commit

Permalink
Escapes catalog and schema names for connections pane
Browse files Browse the repository at this point in the history
  • Loading branch information
edgararuiz committed Oct 1, 2024
1 parent aa1b3be commit 36cf183
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/ide-connections-pane.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ catalog_python <- function(
out <- rs_get_databases(con, limit, catalog)
} else {
if (is.null(catalog)) {
sql_schema <- "show tables in {schema}"
sql_schema <- "show tables in `{schema}`"
} else {
sql_schema <- "show tables in {catalog}.{schema}"
sql_schema <- "show tables in `{catalog}`.`{schema}`"
}
tables <- dbGetQuery(con, glue(sql_schema))
out <- df_tables
Expand All @@ -99,7 +99,7 @@ catalog_python <- function(
rs_get_databases <- function(con, limit = NA, catalog = NULL) {
out <- data.frame()
if (!is.null(catalog)) {
databases <- dbGetQuery(con, glue("show databases in {catalog}"))
databases <- dbGetQuery(con, glue("show databases in `{catalog}`"))
} else {
databases <- dbGetQuery(con, glue("show databases"))
}
Expand Down

0 comments on commit 36cf183

Please sign in to comment.