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

Function getPersistedOwners

packages/query-db-collection/src/query.ts:738–751  ·  view source on GitHub ↗
(rowKey: string | number)

Source from the content-addressed store, hash-verified

736 }
737
738 const getPersistedOwners = (rowKey: string | number) => {
739 const rowMetadata = getRowMetadata(rowKey)
740 const queryMetadata = rowMetadata?.queryCollection
741 if (!queryMetadata || typeof queryMetadata !== `object`) {
742 return new Set<string>()
743 }
744
745 const owners = (queryMetadata as Record<string, unknown>).owners
746 if (!owners || typeof owners !== `object`) {
747 return new Set<string>()
748 }
749
750 return new Set(Object.keys(owners as Record<string, true>))
751 }
752
753 const setPersistedOwners = (
754 rowKey: string | number,

Callers 2

applySuccessfulResultFunction · 0.85

Calls 2

getRowMetadataFunction · 0.85
keysMethod · 0.45

Tested by

no test coverage detected