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

Fields in select statements are not wrapped with apostrophes #24

Closed
derElektrobesen opened this issue Feb 7, 2018 · 1 comment
Closed

Comments

@derElektrobesen
Copy link
Collaborator

If we trying to call go-queryset with statement like NewUserQuerySet(db).NameEq("some_name").One(&user) we should see sql statement like

SELECT * FROM `users` WHERE `users`.`deleted_at` AND ((`name` = ?)) IS NULL ORDER BY `users`.`id` ASC LIMIT 1

but the library generates following statement:

SELECT * FROM `users` WHERE `users`.deleted_at AND ((name = ?)) IS NULL ORDER BY `users`.`id` ASC LIMIT 1

Possibly it could be critical in some cases

@derElektrobesen
Copy link
Collaborator Author

Duplicate for #19

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