-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Description
Hello team, In movie explorer's code
shiny-examples/051-movie-explorer/server.R
Lines 8 to 11 in 8d55896
| # Set up handles to database tables on app start | |
| db <- src_sqlite("movies.db") | |
| omdb <- tbl(db, "omdb") | |
| tomatoes <- tbl(db, "tomatoes") |
The src_sqlite() function was deprecated in {dplyr} 1.0.0, (latest version is 1.1.4)
and it guides to use tbl() function instead as warning message below.
Warning: `src_sqlite()` was deprecated in dplyr 1.0.0.
ℹ Please use `tbl()` directly with a database connection
Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
So how about using DBI::dbConnect and RQLite::SQLite() that suggested in src_sqlite() document?
Example docs
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
copy_to(con, mtcars)Final result
# Set up handles to database tables on app start
con <- DBI::dbConnect(RSQLite::SQLite(), "movies.db")
omdb <- dplyr::tbl(con, "omdb")
tomatoes <- dplyr::tbl(con, "tomatoes")Thanks.
Metadata
Metadata
Assignees
Labels
No labels