Skip to content

Commit

Permalink
Fix Rust type for SQLite REAL (#1785)
Browse files Browse the repository at this point in the history
REAL is stored as as 8-byte IEEE floating point number
See https://www.sqlite.org/datatype3.html#storage_classes_and_datatypes
  • Loading branch information
pruthvikar authored Apr 14, 2022
1 parent 2e026ca commit cc1ab90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sqlx-macros/src/database/sqlite.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
use sqlx_core as sqlx;

// f32 is not included below as REAL represents a floating point value
// stored as an 8-byte IEEE floating point number
// For more info see: https://www.sqlite.org/datatype3.html#storage_classes_and_datatypes
impl_database_ext! {
sqlx::sqlite::Sqlite {
bool,
i32,
i64,
f32,
f64,
String,
Vec<u8>,
Expand Down

0 comments on commit cc1ab90

Please sign in to comment.