Closed
Description
I am using Option<String>
to represent a nullable String but my code bellow complains that it expected a String instead of Option. How should nullable values be written with sqlx?
My code that doesn't work:
let name = Some("D1plo1d");
sqlx::query!(
"INSERT INTO users (name) VALUES ($1)",
name
);
Metadata
Metadata
Assignees
Labels
No labels