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

Possibility of exec multi-statements or load a sql file #325

Closed
labkode opened this issue Mar 24, 2015 · 2 comments
Closed

Possibility of exec multi-statements or load a sql file #325

labkode opened this issue Mar 24, 2015 · 2 comments

Comments

@labkode
Copy link

labkode commented Mar 24, 2015

Currently, using sqlx with pq you are able to exec the contents of a SQL file http://godoc.org/github.com/jmoiron/sqlx#LoadFile
This would be a great feature for this driver.

@arnehormann
Copy link
Member

@labkode we don't support it because Go's database/sql package does not support paging over multiple results and issuing multiple queries leads to multiple results.
We don't want to introduce anything unsupported by database/sql/driver to keep our driver lean, so we don't support multiple results either. So we don't support multiple queries. That's why we don't support something like LoadFile.
Sometimes this is frustrating, but we won't have a weird api if this is supported by database/sql in the future.
See the discussion in #66 - this is a duplicate.

@julienschmidt
Copy link
Member

#339 is what you are looking for 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants