You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we materialise a query into a collection, the results need to be keyed - currently this requires a keyBy clause int he query:
useLiveQuery((q) =>
q
.from({ collection })
.where(`@age`, `>`, 30)
.keyBy(`@id`) // <--- current required, but we want to drop in many cases
.select(`@id`, `@name`)
)
We should be able to drop this for a large number of queries:
basic queries without a join (we may be able to infer a key for some join types)
groupBy can use the column values for the group by to make a default key
A good starting point is to infer a key for single collection queries with only where and select - we can then move on to other cases.
Activity
KyleAMathews commentedon Jun 9, 2025
Fixed by #144