dplyr
dplyr copied to clipboard
Move database generics to dbplyr
Deprecate database generics, following strategy in https://github.com/tidyverse/design/issues/106. Then remove tests, since they should live in dbplyr.
https://github.com/tidyverse/dbplyr/issues/385 needs to happen first.
Remove
setOldClass(c("sql", "character"))
setOldClass(c("ident", "sql", "character"))
Also need to remove sql()
and ident()
(#4434), and src_dbi()
and friends (#4431)
And from #4542
-
Deprecate
src_postgres()
,src_mysql()
, andsrc_sqlite()
. The database dependencies will need to stay in suggests until these functions can be made defunct, which is probably 2021 at the earliest. -
Remove
ident()
andsql()
— the chance of using these before calling one of thesrc_
functions is slim, so you should already be notified. -
Figure out what do to with
tbl.DBIConnection()
andcopy_to.DBIConnection()
. They at least need to go to -
Ensure the
check_dbplyr()
asserts needed version. -
Review documentation to remove examples and ensure the user is pointed firmly towards dbplyr.
-
Remove last use of Lahman package
-
Update reference index
For dplyr 1.0.0 I will:
-
Deprecate
src_postgres()
,src_mysql()
, andsrc_sqlite()
. The database dependencies will need to stay in suggests until these functions can be made defunct, which is probably 2021 at the earliest. -
Remove the
setOldClass()
definitions
Now have a new plan for this where the generics no longer need to move; but we will need to eventually deprecate and then remove the database generics here. See details in https://dbplyr.tidyverse.org/articles/backend-2.html
Need to break this up into smaller issues — I need to analyse this carefully but after #6367, I think all that needs to be done is to deprecate then remove the db_*
/sql_*
generics. Will need to leave copy_to
and tbl
methods in dplyr, so existing code keeps working without first loading dbplyr.
Also need to rename all db files consistently:
# compat-db.R -> ?
# compute-collect.r -> db-compute-complete.R
# copy-to.r -> db-copy-to.R
# dbplyr.r -> db-generics.R
# deprec-dbi -> ?
# explain.R -> db-explain.R
# order-by -> db-order-by
# src_dbi.R -> db-src.R
# src.R -> db-src.R
And plan for shifting all dbplyr generics (e.g. sql
, ident
, show_query
, src
, is.src
, same_src
, auto_copy
, explain
) in dbplyr.
@krlmlr's process for pillar/tibble
- in downstream:
- implement the generic, export it
- in .onLoad() or equivalent, overwrite
generic
withupstream::generic
if it still exists there - copy default methods from upstream without adding
@export
- register methods if they aren't registered yet, I used the naming convention
..._if_..._hasnt
or..._if_..._has
, I'll need to dig up that code if needed - release
- in upstream
- remove generic and default methods
- revdepcheck, alert downstream maintainers
- wait if needed
- release
- in downstream
- remove compatibility code
- release
Will probably need to update advice in https://dbplyr.tidyverse.org/articles/backend-2.html.
Need to start by re-doing #6367 when we have an appetite for more revdep breakages.