-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Highlight sqlx's query_scalar{,_unchecked}
macros as SQL
#6793
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't notice the duplication before but I think we should collapse these patterns where "Only the first argument is SQL" into one pattern and change the (#eq? @_query "query")
part to (#match? @_query "^query(_as|_scalar|_scalar_unchecked)?$")
to match them all more concisely
Sounds like a good idea. However, my lisp skills are fairly low, and I don't currently have the time (or desire) to improve them to make that change. Would you be opposed to merging this as-is and then having someone file a follow-up PR that does improve this situation? |
It seems more effort to open yet another PR than to just do the replacement @the-mikedavis gave you? Remove other queries, then replace |
Oh, sorry! That shows my lisp knowledge -- it sounded more involved than some simple replacements 😅 I've hopefully addressed that in 041b116. |
…tor#6793) * Highlight sqlx's `query_scalar{,_unchecked}` macros as SQL * Update injections.scm * fixup copy-pasta
…tor#6793) * Highlight sqlx's `query_scalar{,_unchecked}` macros as SQL * Update injections.scm * fixup copy-pasta
…tor#6793) * Highlight sqlx's `query_scalar{,_unchecked}` macros as SQL * Update injections.scm * fixup copy-pasta
I noticed these two were missing, so I figured we should add them for completeness.