I am writing an app using shiny where users can add, edit or copy data. The idea is that after they have entered there data in the temporary table it is uploaded to the main database and the table is reset.
I have made a table using RSQLite with the following code:
library(RSQLite)
library(pool)
library(DBI)
pool <- dbPool(RSQLite::SQLite(), dbname = "db.sqlite")
df <- data.frame( name=character(),
group=character(),
stringsAsFactors = FALSE)
dbWriteTable(pool, "#df_temp", df, temporary = TRUE, overwrite = TRUE)
The problem is that if multiple users are using the app at the same time all data is added to the same temporary table. Is there a way to make a temporary table that is specific for each session?