Describe the bug
Per this page about SQLite's data types, INTEGER and REAL columns are loaded into memory as 64-bit ints and floats, respectively. However, jet generates these as 32-bit values, losing some precision:
Environment (please complete the following information):
Expected behavior
By default, INTEGER and REAL models should be 64-bit objects in Go.
I am aware that setting the column types in SQLite to BIGINT and DOUBLE generates 64-bit Go types, but these aren't actually real dtypes in SQLite and would therefore prevent using STRICT tables.
Yeah, I agree. The fix would probably break some builds, but it is better to be safe.
In the meantime, you can use generator customization to change model types.
Describe the bug Per this page about SQLite's data types, INTEGER and REAL columns are loaded into memory as 64-bit ints and floats, respectively. However, jet generates these as 32-bit values, losing some precision:
Environment (please complete the following information):
Code snippet For example, if I have this schema:
user_id, etc should be 64-bit ints, but Jet makes the following model:
Expected behavior By default, INTEGER and REAL models should be 64-bit objects in Go.
I am aware that setting the column types in SQLite to BIGINT and DOUBLE generates 64-bit Go types, but these aren't actually real dtypes in SQLite and would therefore prevent using STRICT tables.