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

Function removeRow

packages/query-db-collection/src/query.ts:702–712  ·  view source on GitHub ↗
(rowKey: string | number, hashedQuerKey: string)

Source from the content-addressed store, hash-verified

700
701 // Helper function to remove a row from the internal state
702 const removeRow = (rowKey: string | number, hashedQuerKey: string) => {
703 const rowToQueriesSet = rowToQueries.get(rowKey) || new Set()
704 rowToQueriesSet.delete(hashedQuerKey)
705 rowToQueries.set(rowKey, rowToQueriesSet)
706
707 const queryToRowsSet = queryToRows.get(hashedQuerKey) || new Set()
708 queryToRowsSet.delete(rowKey)
709 queryToRows.set(hashedQuerKey, queryToRowsSet)
710
711 return rowToQueriesSet.size === 0
712 }
713
714 const internalSync: SyncConfig<any>[`sync`] = (params) => {
715 const { begin, write, commit, markReady, collection, metadata } = params

Callers 2

applySuccessfulResultFunction · 0.85

Calls 3

getMethod · 0.45
deleteMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected