We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm puzzled how to run a client's multiline sql script he provides me in light of #258 (comment)
Here's a simple example, a script foobar.sql containing:
foobar.sql
INSERT INTO `ut_test_foo_bar`(`foobar_invitation_id`) VALUES (@foo_bar_invitation_id);
Typically this file is hundreds of lines.
Tbh, I haven't even't figured out how to transform the quotes.
I'm manually reprogramming each line like so:
result, err := db.Exec( "INSERT INTO ut_test_foo_bar (foobar_invitation_id) VALUES (?)", "blah blah blah", )
Which is super time consuming!!
Driver version (or git SHA):
1a676ac
Go version: run go version in your console
go version
go version go1.10.1 linux/amd64 (running Archlinux)
Server version: Server version: 5.7.12-log MySQL Community Server (GPL)
The text was updated successfully, but these errors were encountered:
This is not Q&A site or user forum. I know about MySQL protocol, but I don't know tools around Go's world.
Sorry, something went wrong.
Could you at least please point me to a good forum to get my question answered?
There is nothing on the README.md to guide me.
Google "go-nuts" or "gopher slack"
Ok, I figured it out via Reddit. https://www.reddit.com/r/golang/comments/8geojz/how_does_one_exec_sql_scripts_with_go/dyb90a5/
No branches or pull requests
Issue description
I'm puzzled how to run a client's multiline sql script he provides me in light of #258 (comment)
Example code
Here's a simple example, a script
foobar.sql
containing:Typically this file is hundreds of lines.
Error log
Tbh, I haven't even't figured out how to transform the quotes.
I'm manually reprogramming each line like so:
Which is super time consuming!!
Configuration
Driver version (or git SHA):
1a676ac
Go version: run
go version
in your consolego version go1.10.1 linux/amd64 (running Archlinux)
Server version: Server version: 5.7.12-log MySQL Community Server (GPL)
The text was updated successfully, but these errors were encountered: