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
letmut qb = QueryBuilder::new("WITH my_id(id) AS (VALUES ");letmut sp = qb.separated(",");for code in new_codes {
sp.push("(");
sp.push_bind_unseparated(String::from(code));
sp.push_unseparated(")");}
qb.push(r#") SELECT m.id as new_id, d.code as old_id FROM my_id m RIGHT JOIN doctors d ON d.code = m.id "#,);debug!("{:?}", qb.sql());let codes = qb
.build_query_as::<DoctorCode>().fetch_all(pool).await.context("failed when get doctors code")?;
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
-
trying to run above code, but i got this error
Beta Was this translation helpful? Give feedback.
All reactions