I am trying to make an insert using Diesel sql_query and return the id of the inserted record, but I am getting an error
here my code
let demo_id: Vec<i32> = sql_query("insert into demo (demoname, description, demovalue) values (?, ?, 2) returning demoid")
.bind::<Text, _>("Demo1")
.bind::<Text, _>("Demo2")
.get_results(&conn).unwrap();
Getting error
the trait `QueryableByName<Pg>` is not implemented for `i32`
Thanks in advance