From c4a305d13aa115574f45fb97e7d3f71282af8d42 Mon Sep 17 00:00:00 2001 From: Pinkesh Date: Thu, 21 Nov 2024 11:30:50 +0530 Subject: [PATCH 1/3] Added supabase streaming filter limitation --- .../backend-logic/backend-query/query-collection.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/resources/control-flow/backend-logic/backend-query/query-collection.md b/docs/resources/control-flow/backend-logic/backend-query/query-collection.md index 1c8d1285..96364054 100644 --- a/docs/resources/control-flow/backend-logic/backend-query/query-collection.md +++ b/docs/resources/control-flow/backend-logic/backend-query/query-collection.md @@ -80,6 +80,16 @@ The instructions to query a Supabase table are almost the same, except that for +:::warning[Limitations of Supabase Streaming with Filters] +When using Supabase query with real-time updates enabled, you have the following limitations: + +1. **Only One Filter is Supported:** Supabase streaming supports only a single filter. Combining multiple filters (e.g., `isActive = true AND city = 'Los Angeles'`) is not allowed. +2. **Delete Events Are Not Filterable:** Streaming queries do not detect deletions, even if the deleted row matches the filter condition. For example, If you are streaming rows with the filter `city = 'New York’` and a row is deleted, the query output will not reflect the deletion. +3. **Updates That Remove Rows from Filteres Are Not Tracked:** Changes that make a row no longer match the filter condition (e.g., updating `isActive` from `true` to `false`) will not trigger an update in the query output. + +For more details, refer the limitations [**here**](https://supabase.com/docs/guides/realtime/postgres-changes?queryGroups=language&language=js&queryGroups=database-method&database-method=dashboard#delete-events-are-not-filterable). +::: + ## Using Query Data The documents retrieved from the backend query can be used to set the record values to the widgets From b6efa673a2c3155c2bff509e1ea975dd974d4ba6 Mon Sep 17 00:00:00 2001 From: pinkeshmars <71133091+pinkeshmars@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:55:15 +0530 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Pooja Bhaumik --- .../backend-logic/backend-query/query-collection.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/resources/control-flow/backend-logic/backend-query/query-collection.md b/docs/resources/control-flow/backend-logic/backend-query/query-collection.md index 96364054..e88bbc76 100644 --- a/docs/resources/control-flow/backend-logic/backend-query/query-collection.md +++ b/docs/resources/control-flow/backend-logic/backend-query/query-collection.md @@ -84,10 +84,10 @@ The instructions to query a Supabase table are almost the same, except that for When using Supabase query with real-time updates enabled, you have the following limitations: 1. **Only One Filter is Supported:** Supabase streaming supports only a single filter. Combining multiple filters (e.g., `isActive = true AND city = 'Los Angeles'`) is not allowed. -2. **Delete Events Are Not Filterable:** Streaming queries do not detect deletions, even if the deleted row matches the filter condition. For example, If you are streaming rows with the filter `city = 'New York’` and a row is deleted, the query output will not reflect the deletion. -3. **Updates That Remove Rows from Filteres Are Not Tracked:** Changes that make a row no longer match the filter condition (e.g., updating `isActive` from `true` to `false`) will not trigger an update in the query output. +2. **Delete Events are not Filterable:** Streaming queries do not detect deletions, even if the deleted row matches the filter condition. For example, If you are streaming rows with the filter `city = 'New York’` and a row is deleted, the query output will not reflect the deletion. +3. **Updates that remove Rows from Filters are not Tracked:** Changes that make a row no longer match the filter condition (e.g., updating `isActive` from `true` to `false`) will not trigger an update in the query output. -For more details, refer the limitations [**here**](https://supabase.com/docs/guides/realtime/postgres-changes?queryGroups=language&language=js&queryGroups=database-method&database-method=dashboard#delete-events-are-not-filterable). +For more details, refer to the limitations mentioned in the [**official Supabase docs**](https://supabase.com/docs/guides/realtime/postgres-changes?queryGroups=language&language=js&queryGroups=database-method&database-method=dashboard#delete-events-are-not-filterable). ::: ## Using Query Data From 78a24027febd4dbe2d72f11d8d100bfbdc5b653a Mon Sep 17 00:00:00 2001 From: Pinkesh Date: Fri, 22 Nov 2024 10:56:56 +0530 Subject: [PATCH 3/3] address review comments --- .../backend-logic/backend-query/query-collection.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/resources/control-flow/backend-logic/backend-query/query-collection.md b/docs/resources/control-flow/backend-logic/backend-query/query-collection.md index e88bbc76..37db013e 100644 --- a/docs/resources/control-flow/backend-logic/backend-query/query-collection.md +++ b/docs/resources/control-flow/backend-logic/backend-query/query-collection.md @@ -83,9 +83,9 @@ The instructions to query a Supabase table are almost the same, except that for :::warning[Limitations of Supabase Streaming with Filters] When using Supabase query with real-time updates enabled, you have the following limitations: -1. **Only One Filter is Supported:** Supabase streaming supports only a single filter. Combining multiple filters (e.g., `isActive = true AND city = 'Los Angeles'`) is not allowed. -2. **Delete Events are not Filterable:** Streaming queries do not detect deletions, even if the deleted row matches the filter condition. For example, If you are streaming rows with the filter `city = 'New York’` and a row is deleted, the query output will not reflect the deletion. -3. **Updates that remove Rows from Filters are not Tracked:** Changes that make a row no longer match the filter condition (e.g., updating `isActive` from `true` to `false`) will not trigger an update in the query output. +- **Only One Filter is Supported:** Supabase streaming supports only a single filter. Combining multiple filters (e.g., `isActive = true AND city = 'Los Angeles'`) is not allowed. +- **Delete Events are not Filterable:** Streaming queries do not detect deletions, even if the deleted row matches the filter condition. For example, If you are streaming rows with the filter `city = 'New York’` and a row is deleted, the query output will not reflect the deletion. +- **Updates that remove Rows from Filters are not Tracked:** Changes that make a row no longer match the filter condition (e.g., updating `isActive` from `true` to `false`) will not trigger an update in the query output. For more details, refer to the limitations mentioned in the [**official Supabase docs**](https://supabase.com/docs/guides/realtime/postgres-changes?queryGroups=language&language=js&queryGroups=database-method&database-method=dashboard#delete-events-are-not-filterable). :::