to_sql | R Documentation |
Add to last argument and pass all others through.
to_sql(
x,
db,
...,
limit = NULL,
source_limit = NULL,
indent_level = 0,
tnum = mk_tmp_name_source("tsql"),
append_cr = TRUE,
using = NULL
)
x |
rquery operation tree. |
db |
DBI database handle or rquery_db_info object. |
... |
generic additional arguments (not used). |
limit |
numeric if not NULL limit result to this many rows. |
source_limit |
numeric if not NULL limit sources to this many rows. |
indent_level |
level to indent. |
tnum |
temp sub-query name generator. |
append_cr |
logical if TRUE end with CR. |
using |
character, if not NULL set of columns used from above. |
SQL command
db_td
, materialize
, execute
, rq_copy_to
, mk_td
if (requireNamespace("DBI", quietly = TRUE) && requireNamespace("RSQLite", quietly = TRUE)) {
my_db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
d1 <- rq_copy_to(my_db, 'd1',
data.frame(AUC = 0.6, R2 = 0.2))
d2 <- rq_copy_to(my_db, 'd2',
data.frame(AUC = 0.6, D = 0.3))
optree <- natural_join(d1, d2, by = "AUC")
cat(format(optree))
print(to_sql(optree, my_db))
DBI::dbDisconnect(my_db)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.