
async fn query_conditional(db: &MySqlPool) -> Result<(), sqlx::Error> {
let limit = Some(10);
conditional_query_as!(
OutputType,
r#"
select id, name from users
{#limit}
"#,
#limit = match limit {
Some(_) => "limit {limit}",
None => ""
},
)
.fetch_all(db)
.await?;