tests/test-swish_temptable.r

################################################################
# name:swish_temptable
require(swishdbtools)
ch <- connect2postgres2("ewedb")
df <- as.data.frame(rep("hello_ewedb", 10))
names(df) <- "hello_ewedb"
tempTableName <- swish_temptable("ewedb")
dbWriteTable(ch, tempTableName$table, df, row.names = F)
tested <- sql_subset(ch, tempTableName$fullname, eval = T)
dbSendQuery(ch, 
  sprintf("drop table %s", tempTableName$fullname)
  )
tested
swish-climate-impact-assessment/swishdbtools documentation built on May 21, 2020, 1:03 a.m.