diff --git a/sync/advanced/compatibility.mdx b/sync/advanced/compatibility.mdx index 0a122fea..6eb1c748 100644 --- a/sync/advanced/compatibility.mdx +++ b/sync/advanced/compatibility.mdx @@ -99,6 +99,7 @@ This table lists all fixes currently supported: | `versioned_bucket_ids` | [Link](#versioned-bucket-ids) | 1.15.0 | 2 | | `fixed_json_extract` | [Link](#fixed-json-extract) | 1.15.0 | 2 | | `custom_postgres_types` | [Link](#custom-postgres-types). | 1.15.3 | 2 | +| `unstable_sqlite_expression_engine` | [Link](#unstable_sqlite_expression_engine). | 1.22.0 | None (unstable) | ### `timestamps_iso8601` @@ -190,3 +191,22 @@ With this fix applied: | 'empty'; ``` - Multi-ranges sync as an array of ranges. + +### `unstable_sqlite_expression_engine` + + +This option is experimental: When enabled, updates to the PowerSync Service might change how rows are processed +and this option may be removed in a future version of the Service. + + +Sync Streams support scalar SQL operators (like `+`, `-` and `||`) and [functions](/sync/supported-sql#functions). +SQL in Sync Streams should behave exactly as it would in SQLite, but the Service uses a custom implementation which differs +from SQLite for some edge cases. + +To perfectly align the behavior of the Service and SQLite, enabling this option makes the Service use an actual +SQLite database to evaluate Sync Streams. +Some known issues with the JavaScript evaluator that are fixed by this option are: + +- Exact null handling: `NOT NULL` evaluates to `TRUE` without this option, enabling it yields `NULL`. +- Without this option, `substr()` and `length()` operate on UTF-16 code units. Enabling it makes them operate on + Unicode code points.