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

Function addRow

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

Source from the content-addressed store, hash-verified

689
690 // Helper function to add a row to the internal state
691 const addRow = (rowKey: string | number, hashedQueryKey: string) => {
692 const rowToQueriesSet = rowToQueries.get(rowKey) || new Set()
693 rowToQueriesSet.add(hashedQueryKey)
694 rowToQueries.set(rowKey, rowToQueriesSet)
695
696 const queryToRowsSet = queryToRows.get(hashedQueryKey) || new Set()
697 queryToRowsSet.add(rowKey)
698 queryToRows.set(hashedQueryKey, queryToRowsSet)
699 }
700
701 // Helper function to remove a row from the internal state
702 const removeRow = (rowKey: string | number, hashedQuerKey: string) => {

Callers 1

applySuccessfulResultFunction · 0.85

Calls 3

getMethod · 0.45
addMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected