Skip to content

Commit

Permalink
sqlite float to uint
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Nov 7, 2024
1 parent 6ef26c7 commit c552ecd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sqlx-core/src/sqlite/types/uint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl Type<Sqlite> for u64 {
}

fn compatible(ty: &SqliteTypeInfo) -> bool {
matches!(ty.0, DataType::Int | DataType::Int64)
matches!(ty.0, DataType::Int | DataType::Int64 | DataType::Float)
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/any/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ async fn it_can_fail_and_recover_with_pool() -> anyhow::Result<()> {

#[sqlx_macros::test]
async fn it_has_unsigned_integers() -> anyhow::Result<()> {
let max_value = u64::MAX;
let max_value = 9223372036854775807;
let expr = if cfg!(feature = "mysql") {
format!("CAST({} AS UNSIGNED)", max_value)
} else {
Expand Down
Binary file modified tests/sqlite/sqlite.db
Binary file not shown.

0 comments on commit c552ecd

Please sign in to comment.