MCPcopy Index your code
hub / github.com/TanStack/db / syncDataFromCollection

Function syncDataFromCollection

packages/angular-db/src/index.ts:223–232  ·  view source on GitHub ↗
(
    currentCollection: Collection<any, any, any>,
  )

Source from the content-addressed store, hash-verified

221 })
222
223 const syncDataFromCollection = (
224 currentCollection: Collection<any, any, any>,
225 ) => {
226 const newState = new Map(currentCollection.entries())
227 const newData = Array.from(currentCollection.values())
228
229 state.set(newState)
230 internalData.set(newData)
231 status.set(currentCollection.status)
232 }
233
234 let unsub: (() => void) | null = null
235 const cleanup = () => {

Callers 1

injectLiveQueryFunction · 0.70

Calls 4

fromMethod · 0.80
entriesMethod · 0.45
valuesMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected