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

Use sqlx::query_file_as! macro #35

Open
n-dusan opened this issue May 14, 2024 · 0 comments
Open

Use sqlx::query_file_as! macro #35

n-dusan opened this issue May 14, 2024 · 0 comments
Assignees

Comments

@n-dusan
Copy link
Contributor

n-dusan commented May 14, 2024

The sql statements would go into a separate sql file. That would help us with syntax highlighting, keeping things more sane, etc.

Have you seen the sqlx::query_file_as! macro? https://github.com/launchbadge/sqlx/tree/main/examples/postgres/files It allows you to keep SQL statements in .sql files. I think it's something to bear in mind as SQL statements get bigger. It's obviously not critical, but I think being able to write SQL in actual .sql files helps keep SQL sane, because then we get things like editor syntax highlighting and linters like https://github.com/sqlfluff/sqlfluff

Originally posted by @tombh in #33 (comment)

@n-dusan n-dusan self-assigned this May 14, 2024
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