r - How can I actually see the raw query generated by DBI::dbWriteTable? -


i wondering if there way retrieve sql query dbwritetable sends dbms. example, following example. there way query?

library(dbi)  con <- dbconnect(rsqlite::sqlite(), ":memory:") dbwritetable(con, "mtcars", mtcars[1:10, ]) dbdisconnect(con) 

edit: 2016-11-11

as postgres user, interested in commands sent using rpostegresql. following @krlmlr, figured there function postgresqlcopyindataframewhich calls c function rs_postgresql_copyindataframe. hit dead-end here c beyond skills. ideas welcome...

the development version of rsqlite, hit cran, uses dbi::sqlcreatetable(). function returns sql creates particular table:

con <- dbconnect(rsqlite::sqlite(), ":memory:") sqlcreatetable(con, "mtcars", mtcars[1:10, ]) dbdisconnect(con) 

for other drivers method definition in driver's source code, e.g., via showmethods("dbwritetable", includedefs = true) , proceed there.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -