We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
let mut sql = String::from("select * from user"); // append sql content ... let arr = sqlx::query!(sql.as_str()).fetch_all(pool).await?;(error: expected string literal) but: let arr = sqlx::query!("select * from user").fetch_all(pool).await?;(it's ok)
A small code snippet or a link to a Github repo or Gist, with instructions on reproducing the bug.
rustc --version
The text was updated successfully, but these errors were encountered:
I want dynamics append sql content, rather than fixed content
Sorry, something went wrong.
Duplicate of #1488
No branches or pull requests
Bug Description
let mut sql = String::from("select * from user");
// append sql content
...
let arr = sqlx::query!(sql.as_str()).fetch_all(pool).await?;(error: expected string literal)
but:
let arr = sqlx::query!("select * from user").fetch_all(pool).await?;(it's ok)
Minimal Reproduction
A small code snippet or a link to a Github repo or Gist, with instructions on reproducing the bug.
Info
rustc --version
: 1.73.0The text was updated successfully, but these errors were encountered: