Fix type-checking option bug

This commit is contained in:
Yuriy Dupyn 2024-02-04 14:40:36 +01:00
parent da8e2d6771
commit c4f5ac7b70

View file

@ -373,7 +373,7 @@ fn type_from_literal_with_type_hint(lit: &Literal, hint: &DbType) -> Result<DbTy
Literal::String(_) => DbType::String,
Literal::Int(_) => DbType::Int,
Literal::Uuid(_) => DbType::Uuid,
Literal::Some(l) => type_from_literal_with_type_hint(l, hint)?,
Literal::Some(l) => DbType::Option(Box::new(type_from_literal_with_type_hint(l, hint)?)),
Literal::None => {
if matches!(hint, DbType::Option(_)) {
hint.clone()