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
pub async fetch(pool:&Pool<Postgres>,tag_id:Option<i32>){
let a = sqlx::query!(
r#"
select * from articles where $1 is null or $1=any(tags)
"#,
tag_id
).fetch_all(pool).await?;
}
the error msg is "could not determine data type of parameter $1"
how can I do this query by sqlx?
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
-
my query function
the error msg is "could not determine data type of parameter $1"
how can I do this query by sqlx?
Beta Was this translation helpful? Give feedback.
All reactions