You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The diesel schema generator associates Integer columns with the diesel::sql_types::Integer type. The trait implementations for diesel::deserialize::FromSql all treat this as representing i32, but as per the sqlite documentation this column type can represent up to 64 bits.
Furthermore the FromSql instances for i64 are all for BigInt; which is not a valid column type in sqlite.
What are you trying to accomplish?
Derive Queryable instances for a struct which uses the same numeric type as the underlying database.
Are you seeing any additional errors?
The following compilation error occurs when attempting to use i64 numbers with the sqlite backend:
the trait `diesel::deserialize::FromSql<diesel::sql_types::Integer, diesel::sqlite::Sqlite>` is not implemented for `i64`
Setup
Versions
Feature Flags
Problem Description
The diesel schema generator associates
Integer
columns with thediesel::sql_types::Integer
type. The trait implementations fordiesel::deserialize::FromSql
all treat this as representingi32
, but as per the sqlite documentation this column type can represent up to 64 bits.Furthermore the
FromSql
instances fori64
are all forBigInt
; which is not a valid column type in sqlite.What are you trying to accomplish?
Derive
Queryable
instances for a struct which uses the same numeric type as the underlying database.Are you seeing any additional errors?
The following compilation error occurs when attempting to use
i64
numbers with the sqlite backend:Steps to reproduce
In migration:
In models.rs
Checklist
closed if this is not the case)
The text was updated successfully, but these errors were encountered: