Skip to content

Commit

Permalink
Merge pull request #91 from duckdb/b-38-tbl-file
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Mar 3, 2024
2 parents 9b0f53f + a246038 commit c670586
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/backend-dbplyr__duckdb_connection.R
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,9 @@ sql_escape_datetime.duckdb_connection <- function(con, x) {
# @param from Table or parquet/csv -files to be registered
# @param cache Enable object cache for parquet files
tbl.duckdb_connection <- function(src, from, cache = FALSE, ...) {
ident_q <- pkg_method("ident_q", "dbplyr")
if (!inherits(from, "sql") & !DBI::dbExistsTable(src, from)) from <- ident_q(from)
if (!inherits(from, "sql") && !DBI::dbExistsTable(src, from)) {
from <- dbplyr::sql(paste0("FROM ", from))
}
if (cache) DBI::dbExecute(src, "PRAGMA enable_object_cache")
NextMethod("tbl")
}
Expand Down

0 comments on commit c670586

Please sign in to comment.