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

Function wrappedQuery

packages/vue-db/src/useLiveQuery.ts:306–314  ·  view source on GitHub ↗
(q: InitialQueryBuilder)

Source from the content-addressed store, hash-verified

304 // To avoid calling the query function twice, we wrap it to handle null/undefined returns
305 // The wrapper will be called once by createLiveQueryCollection
306 const wrappedQuery = (q: InitialQueryBuilder) => {
307 const result = unwrappedParam(q)
308 // If the query function returns null/undefined, throw a special error
309 // that we'll catch to return null collection
310 if (result === undefined || result === null) {
311 throw new Error(`__DISABLED_QUERY__`)
312 }
313 return result
314 }
315
316 try {
317 return createLiveQueryCollection({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected