We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 838a239 commit f6d2fa3Copy full SHA for f6d2fa3
sqlx-core/src/type_checking.rs
@@ -72,11 +72,17 @@ where
72
73
match T::decode(value.as_ref()) {
74
Ok(value) => Debug::fmt(&value, f),
75
- Err(e) => f.write_fmt(format_args!(
76
- "(error decoding SQL type {} as {}: {e:?})",
77
- info.name(),
78
- std::any::type_name::<T>()
79
- )),
+ Err(e) => {
+ if e.is::<crate::error::UnexpectedNullError>() {
+ f.write_str("NULL")
+ } else {
+ f.write_fmt(format_args!(
80
+ "(error decoding SQL type {} as {}: {e:?})",
81
+ info.name(),
82
+ std::any::type_name::<T>()
83
+ ))
84
+ }
85
86
}
87
},
88
0 commit comments