[Electric Collections] partial columns (on-demand/progressive syncMode like for columns) #831
fcannizzaro
started this conversation in
Ideas
Replies: 1 comment
-
|
I use this pattern in my current app (not tanstackdb atm), I fetch the table name and some other metadata. If I click the item I will fetch the missing data. I also may fetch a few of the items fully as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A possible enhancement to the new
on-demand/progressivesyncMode could be to prioritize only needed columns that are requested by live query builder functions (ex. .select(), .where(), etc..) and then loads the other column in background. (Maybe this could also be a flag in the collection config to preload all columns or only needed by a live query)sequenceDiagram Component->>+DB: needs `id`, `title` DB->>Electric: requests rows with only `id`, `title` columns Electric->>DB: rows DB->>Component: render DB->>Electric: requests missing columns (background) Electric->>DB: rows DB->>DB: merge with existing dataBeta Was this translation helpful? Give feedback.
All reactions