API reference › @evolu/common › Sqlite › SqliteValue

const SqliteValue: union(
  FiniteNumber,
  Null,
  String,
  Uint8Array,
);

Defined in: packages/common/src/Sqlite.ts:208

A value that can be stored in Sqlite.

Numeric values use FiniteNumber because JavaScript numbers also include NaN and infinities. SQLite binds NaN as NULL, while JSON serialization converts all non-finite numbers to null. Restricting numbers to finite values preserves them across storage and query serialization.

SQLite INTEGERs beyond 2^53, which only SQL itself can produce, read as the nearest number: every Evolu driver reads INTEGER as a number, and an exact Int64 would need a bigint in SqliteValue and in every driver at once.