Skip to content

Commit

Permalink
feat(adapter-d1): allow parsing bool from double. DRIVER_ADAPTERS_BRA…
Browse files Browse the repository at this point in the history
…NCH=jkomyno/fix/d1-tests (#4786)
  • Loading branch information
jkomyno authored Mar 22, 2024
1 parent ff01c8c commit e53b11a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions query-engine/connectors/sql-query-connector/src/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ fn row_value_to_prisma_value(p_value: Value, meta: ColumnMetadata<'_>) -> Result
ValueType::Boolean(Some(b)) => PrismaValue::Boolean(b),
ValueType::Bytes(Some(bytes)) if bytes.as_ref() == [0u8] => PrismaValue::Boolean(false),
ValueType::Bytes(Some(bytes)) if bytes.as_ref() == [1u8] => PrismaValue::Boolean(true),
ValueType::Double(Some(i)) => PrismaValue::Boolean(i.to_i64().unwrap() != 0),
_ => return Err(create_error(&p_value)),
},
TypeIdentifier::Enum(_) => match p_value.typed {
Expand Down

0 comments on commit e53b11a

Please sign in to comment.