remote_name()
gives the unescaped name of the remote table, or NULL
if it
is a query (created by sql()
) or already escape (created by ident_q()
).
remote_table()
gives the remote table or the query.
remote_query()
gives the text of the query, and remote_query_plan()
the query plan (as computed by the remote database). remote_src()
and
remote_con()
give the dplyr source and DBI connection respectively.
remote_name(x, null_if_local = TRUE)
remote_table(x, null_if_local = TRUE)
remote_src(x)
remote_con(x)
remote_query(x, cte = FALSE, sql_options = NULL)
remote_query_plan(x, ...)
Remote table, currently must be a tbl_sql.
Return NULL
if the remote table is created via
tbl_lazy()
or lazy_frame()
?
SQL rendering options generated by
sql_options()
.
Additional arguments passed on to methods.
The value, or NULL
if not remote table, or not applicable.
For example, computed queries do not have a "name"
mf <- memdb_frame(x = 1:5, y = 5:1, .name = "blorp")
remote_name(mf)
#> [1] "blorp"
remote_src(mf)
#> src: sqlite 3.46.0 [:memory:]
#> tbls: blorp, dbplyr_1EmJho1LAQ, dbplyr_1qeoeBlLyC, dbplyr_6Z9IdGwG0v,
#> dbplyr_9Iljj7AHPg, dbplyr_BBVkzIbwPc, dbplyr_CNpgJ0rwwz, dbplyr_GFNKytsiP4,
#> dbplyr_PI00mcoYKy, dbplyr_QIkai6WDzH, dbplyr_SLnb4eYrKP, dbplyr_SwlKLUUEdL,
#> dbplyr_UCWowK4ZE6, dbplyr_W07wcNlUsR, dbplyr_Xl258RgjzX, dbplyr_Y1bPB7zLD3,
#> dbplyr_bi4QGpw7oQ, dbplyr_crUoBF7QxM, dbplyr_jRmVMuJacg, dbplyr_kGJgwxHhiY,
#> dbplyr_s9uvuVs7Tn, dbplyr_vQgF0fivjF, dbplyr_x1a33XGCin, df,
#> dplyr::band_instruments, dplyr::band_members, mtcars, sqlite_stat1,
#> sqlite_stat4, squirrels
remote_con(mf)
#> <SQLiteConnection>
#> Path: :memory:
#> Extensions: TRUE
remote_query(mf)
#> <SQL> SELECT *
#> FROM `blorp`
mf2 <- dplyr::filter(mf, x > 3)
remote_name(mf2)
#> NULL
remote_src(mf2)
#> src: sqlite 3.46.0 [:memory:]
#> tbls: blorp, dbplyr_1EmJho1LAQ, dbplyr_1qeoeBlLyC, dbplyr_6Z9IdGwG0v,
#> dbplyr_9Iljj7AHPg, dbplyr_BBVkzIbwPc, dbplyr_CNpgJ0rwwz, dbplyr_GFNKytsiP4,
#> dbplyr_PI00mcoYKy, dbplyr_QIkai6WDzH, dbplyr_SLnb4eYrKP, dbplyr_SwlKLUUEdL,
#> dbplyr_UCWowK4ZE6, dbplyr_W07wcNlUsR, dbplyr_Xl258RgjzX, dbplyr_Y1bPB7zLD3,
#> dbplyr_bi4QGpw7oQ, dbplyr_crUoBF7QxM, dbplyr_jRmVMuJacg, dbplyr_kGJgwxHhiY,
#> dbplyr_s9uvuVs7Tn, dbplyr_vQgF0fivjF, dbplyr_x1a33XGCin, df,
#> dplyr::band_instruments, dplyr::band_members, mtcars, sqlite_stat1,
#> sqlite_stat4, squirrels
remote_con(mf2)
#> <SQLiteConnection>
#> Path: :memory:
#> Extensions: TRUE
remote_query(mf2)
#> <SQL> SELECT `blorp`.*
#> FROM `blorp`
#> WHERE (`x` > 3.0)