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

Function getData

packages/solid-db/src/useLiveQuery.ts:426–438  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

424
425 // We have to remove getters from the resource function so we wrap it
426 function getData() {
427 const currentCollection = collection()
428 if (currentCollection) {
429 const config: CollectionConfigSingleRowOption<any, any, any> =
430 currentCollection.config
431 if (config.singleResult) {
432 // Force resource tracking so Suspense works
433 getDataResource()
434 return data[0]
435 }
436 }
437 return getDataResource()
438 }
439
440 Object.defineProperties(getData, {
441 data: {

Callers 1

getFunction · 0.85

Calls 1

collectionFunction · 0.85

Tested by

no test coverage detected