4 ms·
> Writes automatically cause any relevant live queries to update. How do you decide what queries are relevant?
by prepor 3y ago
> Writes automatically cause any relevant live queries to update.
How do you decide what queries are relevant?
- prepor 3y agohttps://github.com/electric-sql/electric/blob/main/clients/typescript/src/frameworks/react/hooks/useLiveQuery.ts#L172C1-L177C82 https://github.com/electric-sql/electric/blob/main/clients/t... // Once we have electric, we then establish the data change // notification subscription, comparing the tablenames used by the // query with the changed tablenames in the data change notification // to determine whether to re-query or not. // // If we do need to re-query, then we use the saved function to reuse the query So it re-runs queries on all updates in tables from the query.