Sync Rules are deprecated. This page applies to both Sync Streams and Sync Rules unless a section says otherwise.
nullinteger: a 64-bit signed integerreal: a 64-bit floating point numbertext: A UTF-8 text stringblob: Binary data
Postgres Type Mapping
Postgres types are mapped to SQLite types as follows:Binary data can be selected in sync queries, but cannot be used as a parameter. To sync binary columns/fields to clients, convert them to a hex or base64 representation using the relevant functions.
Convex Type Mapping
Convex values are mapped to SQLite types as follows:- Convex documents are converted to a flat list of columns, one column per top-level field.
- Nested objects and arrays are converted to JSON, and JSON functions and operators can be used to query them in Sync Streams or on the client-side SQLite database.
- Cast Convex
Int64fields toINTEGERin Sync Streams when you want SQLite integer values on the client, for exampleCAST(an_int64_column AS INTEGER) AS an_int64_column.
MongoDB Type Mapping
MongoDB types are mapped to SQLite types as follows:- Data is converted to a flat list of columns, one column per top-level field in the MongoDB document.
- Special BSON types are converted to plain SQLite alternatives. For example,
ObjectId,Date,UUIDare all converted to a plainTEXTcolumn. - Nested objects and arrays are converted to JSON, and JSON functions and operators can be used to query them (in sync queries or in client-side SQLite statements).
- Binary data nested in objects or arrays is not supported.
Binary data can be selected in sync queries, but cannot be used as a parameter. To sync binary columns/fields to clients, convert them to a hex or base64 representation using the relevant functions.
MySQL Type Mapping
MySQL support is currently in a Beta release.
Binary data can be selected in sync queries, but cannot be used as a parameter. To sync binary columns/fields to clients, convert them to a hex or base64 representation using the relevant functions.
SQL Server Type Mapping
SQL Server support is currently in a Beta release.
Binary data can be selected in sync queries, but cannot be used as a parameter. To sync binary columns/fields to clients, convert them to a hex or base64 representation using the relevant functions.