Skip to content

Commit c552ecd

Browse files
committed
sqlite float to uint
1 parent 6ef26c7 commit c552ecd

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

sqlx-core/src/sqlite/types/uint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl Type<Sqlite> for u64 {
8383
}
8484

8585
fn compatible(ty: &SqliteTypeInfo) -> bool {
86-
matches!(ty.0, DataType::Int | DataType::Int64)
86+
matches!(ty.0, DataType::Int | DataType::Int64 | DataType::Float)
8787
}
8888
}
8989

tests/any/any.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ async fn it_can_fail_and_recover_with_pool() -> anyhow::Result<()> {
223223

224224
#[sqlx_macros::test]
225225
async fn it_has_unsigned_integers() -> anyhow::Result<()> {
226-
let max_value = u64::MAX;
226+
let max_value = 9223372036854775807;
227227
let expr = if cfg!(feature = "mysql") {
228228
format!("CAST({} AS UNSIGNED)", max_value)
229229
} else {

tests/sqlite/sqlite.db

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)