API reference › @evolu/common › Type › Int64
type Int64 = bigint & Brand<"Int64">;
Defined in: packages/common/src/Type.ts:4065
64-bit signed integer.
Int64 represents a BigInt constrained to a 64-bit signed integer range,
which is useful for platforms that do not support the bigint type, such as
SQLite.
Because SQLite lacks a dedicated bigint type, it may return number or
'Int64 depending on the stored value or even a wrong value if a platform wrapper does not support it. A workaround for SQLite is to insert 'Int64
serialized as a string (SQLite will convert it to int) and manually cast the
result to a string in SQL query and then to Int64 in JS.