Does a Go Mysql driver exist that supports multiple statements within a single string?

前端 未结 5 2120
生来不讨喜
生来不讨喜 2020-12-18 04:44

I\'m trying to find a MySql driver that i can use with Go which supports issuing multiple SQL statements in one call. For example i might wish to create a database using the

5条回答
  •  北海茫月
    2020-12-18 05:06

    I would recommend simply making 2 calls. Why not? It makes the code easier to grok and improves the error handling.

    The other option, if you have a large SQL file from the dump is to shell out and execute the whole thing in one go.

提交回复
热议问题