MCPcopy Create free account
hub / github.com/TanStack/db / syncDataFromCollection

Function syncDataFromCollection

packages/svelte-db/src/useLiveQuery.svelte.ts:370–377  ·  view source on GitHub ↗
(
    currentCollection: Collection<any, any, any>,
  )

Source from the content-addressed store, hash-verified

368
369 // Helper to sync data array from collection in correct order
370 const syncDataFromCollection = (
371 currentCollection: Collection<any, any, any>,
372 ) => {
373 untrack(() => {
374 internalData = []
375 internalData.push(...Array.from(currentCollection.values()))
376 })
377 }
378
379 // Track current unsubscribe function
380 let currentUnsubscribe: (() => void) | null = null

Callers 1

useLiveQueryFunction · 0.70

Calls 2

fromMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected