Skip to content

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

Closed
@labkode

Description

@labkode

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.

Activity

arnehormann

arnehormann commented on Mar 24, 2015

@arnehormann
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

julienschmidt commented on Jun 3, 2015

@julienschmidt
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @julienschmidt@arnehormann@labkode

        Issue actions

          Possibility of exec multi-statements or load a sql file · Issue #325 · go-sql-driver/mysql