write_flob | R Documentation |
Write a flob
to a SQLite database.
write_flob(flob, column_name, table_name, key, conn, exists = NA)
flob |
A flob. |
column_name |
A string of the name of the BLOB column. |
table_name |
A string of the name of the existing table. |
key |
A data.frame whose columns and values are used to filter the
table to a single row (this in combination with the |
conn |
A SQLite connection object. |
exists |
A logical scalar specifying whether the column must (TRUE) or mustn't (FALSE) already exist or whether it doesn't matter (NA). IF FALSE, a new BLOB column is created. |
An invisible copy of flob.
flob <- flobr::flob_obj conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") DBI::dbWriteTable(conn, "Table1", data.frame(IntColumn = c(1L, 2L))) DBI::dbReadTable(conn, "Table1") key <- data.frame(IntColumn = 2L) write_flob(flob, "BlobColumn", "Table1", key, conn, exists = FALSE) DBI::dbReadTable(conn, "Table1") DBI::dbDisconnect(conn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.