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
This is the error message if you try to Turbosql a u64:
SQLite cannot natively store unsigned 64-bit integers, so Turbosql does not support u64 fields. Use i64, u32, f64, or a string or binary format instead.
rusqlite provides an interesting feature i128_blob:
i128_blob allows storing values of type i128 type in SQLite databases. Internally, the data is stored as a 16 byte big-endian blob, with the most significant bit flipped, which allows ordering and comparison between different blobs storing i128s to work as expected.
So it would be possible to support i128_blob in Turbosql too, and support u64 mapped in this same way to a SQLite BLOB. This would definitely have to be gated behind an opt-in feature (u64_i128_as_blob?) to make clear that these two primitive numeric datatypes in Rust will behave differently than the others from SQLite's perspective. (BLOB serial type code vs an integer serial type code: https://sqlite.org/fileformat.html#record_format ) This would also affect any external software that might want to read the data from the .sqlite file.
The text was updated successfully, but these errors were encountered:
trevyn
changed the title
Some thoughts about u64u64: Some thoughts.
Jan 13, 2021
This is the error message if you try to Turbosql a
u64
:rusqlite
provides an interesting featurei128_blob
:So it would be possible to support
i128_blob
in Turbosql too, and supportu64
mapped in this same way to a SQLiteBLOB
. This would definitely have to be gated behind an opt-in feature (u64_i128_as_blob
?) to make clear that these two primitive numeric datatypes in Rust will behave differently than the others from SQLite's perspective. (BLOB
serial type code vs an integer serial type code: https://sqlite.org/fileformat.html#record_format ) This would also affect any external software that might want to read the data from the.sqlite
file.The text was updated successfully, but these errors were encountered: