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

escape reserved symbols #21

Open
megabild opened this issue May 28, 2018 · 0 comments
Open

escape reserved symbols #21

megabild opened this issue May 28, 2018 · 0 comments

Comments

@megabild
Copy link

megabild commented May 28, 2018

It would be nice to tell sqrl to escape column names for example "status" is a reserved symbol in mysql.

users := sq.Select("status").From("users").Join("emails USING (email_id)")
fmt.Println(users.ToSql())

output is:

SELECT status FROM users JOIN emails USING (email_id) [] <nil>

should be:

SELECT `status` FROM users JOIN emails USING (email_id) [] <nil>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant