Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-think dbDriver("drivername") #1

Closed
hadley opened this issue Oct 17, 2013 · 3 comments
Closed

Re-think dbDriver("drivername") #1

hadley opened this issue Oct 17, 2013 · 3 comments

Comments

@hadley
Copy link
Member

hadley commented Oct 17, 2013

This fails when a package is loaded but not attached (i.e. when the package is loaded with imports) because do.call can not find the function name in the global environment.

It might be better to have a convention where it also looks for packageName::packageName

@seth
Copy link
Member

seth commented Oct 17, 2013

While I don't think we can remove it for back-compat reasons, I'm not all that clear of the value of dbDriver as a generic. The arguments needed to connect to a particular backend are at the crux of the "what is different". Each package already (I think) has a function like SQLite(). I wonder if we should move to have that be the way to get a driver.

@hadley
Copy link
Member Author

hadley commented Oct 17, 2013

Good point. It might be more useful to reframe dbDriver as a way of determining the driver from a connection or result.

Then we could gradually deprecate the character method and encourage people to call the package specific connect function directly.

@hadley
Copy link
Member Author

hadley commented Oct 18, 2013

Another idea would be to encourage package authors to create individual functions like sqliteConnect() that users would call - that would be a more natural place for the documentation to live.

@hadley hadley closed this as completed in ce927d9 Oct 22, 2013
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants