Hi, I'm running a simple insert query and would like to get the returning row however, the row returned is empty.
let row = client.query_one(
"INSERT INTO test (state) VALUES ($1)",
&[&"user6"],
).await?;
let id: i32 = row.get(0);
let state: &str = row.get(1);
println!(
"found test: {}) {}",
id, state
);
When I run the above I'm getting this error Error: Error { kind: RowCount, cause: None }
I tried using client.query() initially but the returned rows is empty too. I don't know what I'm missing.
Thanks!
Hi, I'm running a simple insert query and would like to get the returning row however, the row returned is empty.
When I run the above I'm getting this error
Error: Error { kind: RowCount, cause: None }
I tried usingclient.query()
initially but the returnedrows
is empty too. I don't know what I'm missing. Thanks!