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

Why are why you using back-ticks for sqlite identifiers instead of double quotes? #220

Closed
SpyrosRoum opened this issue Jan 2, 2022 · 5 comments · Fixed by #221
Closed

Comments

@SpyrosRoum
Copy link
Contributor

If you switch to double quotes then you avoid this sqlx issue, which would allow RETURNING to work for SQLite for every backend (plus you are more correct according to the SQL standard))
SQLite keywords

@SpyrosRoum SpyrosRoum changed the title Why are why you using back-ticks ("") for sqlite identifiers instead of double quotes ("`)? Why are why you using back-ticks ("\") for sqlite identifiers instead of double quotes ("`)? Jan 2, 2022
@SpyrosRoum SpyrosRoum changed the title Why are why you using back-ticks ("\") for sqlite identifiers instead of double quotes ("`)? Why are why you using back-ticks for sqlite identifiers instead of double quotes? Jan 2, 2022
@tyt2y3
Copy link
Member

tyt2y3 commented Jan 2, 2022

It might not be a problem with SQLx. May be we can cross-check using Rusqlite?
Anyhow I support this change.

@SpyrosRoum
Copy link
Contributor Author

So I run most of what's in the tests in table.rs, I checked returning and I checked a few select queries as well.
All of them seem to work fine with double quotes

@SpyrosRoum
Copy link
Contributor Author

With this closed, the comments saying that RETURNING doesn't work for sqlx can be removed now.
I didn't think it was fitting to include the change in the pr but I'm happy to open a new one if you want

tyt2y3 added a commit that referenced this issue Jan 8, 2022
@tyt2y3
Copy link
Member

tyt2y3 commented Jan 8, 2022

@billy1624 I think you might want to close the SQLx issue

tyt2y3 added a commit that referenced this issue Jan 8, 2022
@billy1624
Copy link
Member

@billy1624 I think you might want to close the SQLx issue

Yes, we should

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

Successfully merging a pull request may close this issue.

3 participants