Skip to content

Conversation

julienschmidt
Copy link
Member

No description provided.

@ghost ghost assigned julienschmidt Jul 1, 2013
@arnehormann
Copy link
Member

I like the README.md change, but I don't know why you want to export the driver and I'm slightly against it. Please convince me, what's your plan for the future?
I have to say I didn't follow golang-dev and golang-nuts this weekend, so if there's a compelling new feature possible by this change, I'm game...

@julienschmidt
Copy link
Member Author

This is to allow others to use this driver without the database/sql package, e.g. if somebody wants to fork the database/sql package or writes an alternative. Also this gives direct control over connections which might be handy in some rare cases, but this is not the intended result.

@julienschmidt
Copy link
Member Author

I already saw some code somewhere where a dirty hack (http://golang.org/pkg/database/sql/#DB.Driver) was used to get the Driver and use it in an alternative database API than the database/sql package.

@arnehormann
Copy link
Member

Eeek, I really dislike the existance of that function... Ok. I have a little hope left for Issue 5606 and this would mess with the resolution or make it more complicated later. That's why I dislike it.
Would adding an interface with the functions needed and another function to get an instance of the interface (the unexported driver) also be ok? We'd keep a little more control over the exposed api of the driver that way. If you still want to add it as is, LGTM (sigh)

@julienschmidt
Copy link
Member Author

The struct exposes exactly one function, Open(..).

@arnehormann
Copy link
Member

Sorry, I got confused and mixed some stuff up. LGTM

julienschmidt added a commit that referenced this pull request Jul 2, 2013
Export driver struct and improve doc
@julienschmidt julienschmidt merged commit f82b14f into master Jul 2, 2013
@julienschmidt julienschmidt deleted the driver branch July 2, 2013 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants