Deleting from an associated table with a subquery using Diesel from a postgres database
问题 I have a query that I am trying to translate from SQL into rust/diesel but am running into issues with creating a subquery using diesel. I am using diesel = "1.4.2" along with the postgres feature. I have the following schema and models... #[macro_use] extern crate diesel; mod schema { table! { jobs (id) { id -> Int4, } appointments (id) { id -> Int4, } categories (id) { id -> Int4 } appointments_categories(appointment_id, category_id) { appointment_id -> Int4, category_id -> Int4 } } } mod