Skip to content

Implement RStudio Connection Contract #11

@krlmlr

Description

@krlmlr

Link: https://rstudio.github.io/rstudio-extensions/connections-contract.html

Should be possible by changing the implementation of the generic to

setGeneric("dbConnect",
  def = function(drv, ...) {
    con <- standardGeneric("dbConnect")
    register_con_with_rstudio(con)
    con
  },
  valueClass = "DBIConnection"
)

instead of the current implementation:

setGeneric("dbConnect",
  def = function(drv, ...) standardGeneric("dbConnect"),
  valueClass = "DBIConnection"
)

Similar for dbDisconnect(). I'm not sure about the connectionUpdated() entry point, because DBI currently doesn't provide notification.

Implementation sketch by @edgararuiz: https://gist.github.com/edgararuiz/0533b3daf70a41b70acd75c1e6a2b7a3.

Happy to review a PR. CC @nwstephens @jimhester.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions