[WIP] Docs updates in preparation for the Sync Streams beta release#349
[WIP] Docs updates in preparation for the Sync Streams beta release#349
Conversation
…docs into sync-stream-beta
|
When I reviewed the Sync Streams "Quickstart" page, and it explained user-scoped data and parameterized data, I felt we could simplify that because we want to reduce the overall number of new concepts that the user feels they need to go through. When talking about parameterized data, we referred exclusively to using subscription parameters, but:
I ended up editing that section a bit and collapsing the Using Parameters section into it. |
|
@benitav Suggestions for improvements to the Supported SQL page: Operators and Functions
I think we should be as specific as possible. Remove "typically" and "special limits apply" and rather say exactly what is and what is not supported (and distinguish Sync Rules vs Sync Streams respectively, if they differ) Operators"Arrays:" says the following:
This seems to be specific to Sync Rules (and uses Sync Rules terminology). Can we update that section to specify what is supported in Sync Streams vs. Sync Rules w.r.t. arrays and the |
sync/supported-sql.mdx
Outdated
| -- Supported in data queries | ||
| WHERE status != 'archived' | ||
| WHERE deleted_at IS NOT NULL | ||
| WHERE category NOT IN ('draft', 'hidden') |
There was a problem hiding this comment.
NOT IN is not supported in sync rules.
sync/supported-sql.mdx
Outdated
| ```sql | ||
| WHERE status != 'archived' | ||
| WHERE deleted_at IS NOT NULL | ||
| WHERE category NOT IN ('draft', 'hidden') |
There was a problem hiding this comment.
This syntax is not supported in sync rules - should be NOT IN '["draft", "hidden"]'. But the latter version actually fails with the new compiler - need to fix.
There was a problem hiding this comment.
Just to confirm, was there a typo and are you saying that the syntax for sync streams should be NOT IN '["draft", "hidden"]', or is the syntax above correct for sync streams and for sync rules it's NOT IN '["draft", "hidden"]'
There was a problem hiding this comment.
Sorry, I confused these.
Sync rules don't support NOT IN at all.
Sync streams should support it (except for a bug), but with the NOT IN '["draft", "hidden"]' syntax.
sync/supported-sql.mdx
Outdated
|
|
||
| **`OR`** | ||
|
|
||
| Supported in parameter queries only when both sides of the `OR` reference the exact same set of parameters. In practice this is rarely useful — use separate parameter queries instead. |
There was a problem hiding this comment.
OR is also supported in data queries when both sides reference the same bucket parameters.
sync/supported-sql.mdx
Outdated
| WHERE category NOT IN ('draft', 'hidden') | ||
|
|
||
| -- Not supported in parameter queries | ||
| WHERE NOT users.is_admin = true |
Details are in this internal doc https://docs.google.com/document/d/1oP0UNOjpsfSrQ1a2WIhG0A0DYeWU1tTIGZqMMKuqzdE/edit
At a high level, this prioritizes Sync Streams over Sync Rules throughout the documentation and labels Sync Rules as legacy, updates alpha references to beta, fleshed out Sync Streams docs, and also documents new features (e.g. nested subqueries, JOIN syntax, CTEs) that have been added since the alpha release (though not yet released).
Also includes some general polish: