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

About configuration sql_mode=ANSI_QUOTES in MySQL #21

kkdai opened this issue Feb 16, 2016 · 1 comment


None yet
2 participants
Copy link

commented Feb 16, 2016

Thanks for your great package, I am wondering why the SQL always get quote in table name?
db.From("user").ToSql() // SELECT * from "user"

It might be issue if user don't set environment parameter in MySQL

mysql> SET sql_mode='ANSI_QUOTES';

or in their connect string

db_uri = fmt.Sprintf("%s:%s@tcp(%s)/%s?timeout=30s&parseTime=true&sql_mode='ANSI_QUOTES'", user, pass, addr, dbname)
Otherwise it will always get error at beginning.

Do you think it would be more clear to add this setting in test case or document?


This comment has been minimized.

Copy link

commented May 28, 2018

See #44 - you probably did not register the mysql adapter correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.