Skip to content

Commit

Permalink
align where_table with where_schema in list_tables()
Browse files Browse the repository at this point in the history
  • Loading branch information
dpprdan committed Dec 14, 2022
1 parent a21814b commit b54a868
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ list_tables <- function(where_schema = NULL, where_table = NULL, order_by = NULL
query <- paste0(query, " AND ", where_schema)
}

if (!is.null(where_table)) query <- paste0(query, where_table)
if (!is.null(where_table)) query <- paste0(query, " AND ", where_table)

if (!is.null(order_by)) query <- paste0(query, "ORDER BY ", order_by)

Expand All @@ -151,7 +151,7 @@ exists_table <- function(conn, id) {
name <- id@name
stopifnot("table" %in% names(name))
table_name <- dbQuoteString(conn, name[["table"]])
where_table <- paste0("AND table_name = ", table_name, " \n")
where_table <- paste0("table_name = ", table_name, " \n")

if ("schema" %in% names(name)) {
schema_name <- dbQuoteString(conn, name[["schema"]])
Expand Down

0 comments on commit b54a868

Please sign in to comment.