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
I'm using SQLite with a database schema where all column values are required (not nullable). Unfortunately query_as! doesn't infer the nullability of the columns correctly. So if I want to use query macros, a query to get the last row expands from:
I also looked into trying to extract the SELECT ... FROM my_table part to a static variable to format!() with the rest of the query, but I get an error that query_as! "expected string literal".
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using SQLite with a database schema where all column values are required (not nullable). Unfortunately
query_as!
doesn't infer the nullability of the columns correctly. So if I want to use query macros, a query to get the last row expands from:to the voluminous:
Is there possibly any shorthand for this?
I also looked into trying to extract the
SELECT ... FROM my_table
part to a static variable toformat!()
with the rest of the query, but I get an error thatquery_as!
"expected string literal".Beta Was this translation helpful? Give feedback.
All reactions