You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the select! and execute! macros require a string literal for any raw SQL in your queries, and they do not work with a string slice or constant. You may find this limiting.
Some ideas:
Factor the query out into its own function, and re-use that function instead.
The Turbosql macro needs to see a string literal, but there could be an outer macro that replaces a token of your choosing with a string literal of your choosing, before it is passed to the Turbosql macro.
Ask for a select_unchecked! or similar macro. There are significant downsides to this approach, and there are also certainly cases where it could be useful.
The text was updated successfully, but these errors were encountered:
trevyn
changed the title
"I want to be able to use a dynamic or const SQL statement"
Dynamic or const SQL statements
Jan 13, 2021
Right now, the
select!
andexecute!
macros require a string literal for any raw SQL in your queries, and they do not work with a string slice or constant. You may find this limiting.Some ideas:
select_unchecked!
or similar macro. There are significant downsides to this approach, and there are also certainly cases where it could be useful.The text was updated successfully, but these errors were encountered: