Types

PowerSync sync rules uses the SQLite type system.

The supported types are:

  1. null

  2. integer: a 64-bit signed integer

  3. real: a 64-bit floating point number

  4. text: An UTF-8 text string

  5. blob: Binary data

Binary data in Postgres can be accessed in sync rules, but cannot be synced directly to clients (it needs to be converted to hex or base64 first — see below), and cannot be used as bucket parameters.

Postgres values are mapped according to this table:

There is no dedicated boolean data type. Boolean values are represented as 1 (true) or 0 (false).

json and jsonb values are treated as text values in their serialized representation. JSON functions and operators operate directly on these text values.

Last updated