CREATE TABLE IF NOT EXISTS test_opt(
id Int32 NOT NULL,
title Utf8,
PRIMARY KEY (id)
);
insert into test_opt(id, title) values
(1, 'title1'),
(2, 'title2'),
(3, 'title3')
;
then
let rows = sqlx::query_as::<_,(i32, Option<String>)>(r#"
select * from test_opt
"#).fetch_all(&mut *conn).await.unwrap();
cause error:
ColumnDecode { index: "1", source: Convert("failed to convert from Optional to alloc::string::String")
then
cause error: