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

Function processMoveInEvent

packages/electric-db-collection/src/electric.ts:1258–1276  ·  view source on GitHub ↗
(patterns: Array<MovePattern>)

Source from the content-addressed store, hash-verified

1256 * This is a silent operation — no messages are emitted to the collection.
1257 */
1258 const processMoveInEvent = (patterns: Array<MovePattern>): void => {
1259 if (tagLength === undefined) {
1260 debug(
1261 `${collectionId ? `[${collectionId}] ` : ``}Received move-in message but no tag length set yet, ignoring`,
1262 )
1263 return
1264 }
1265
1266 for (const pattern of patterns) {
1267 const affectedRowIds = findRowsMatchingPattern(pattern, tagIndex)
1268
1269 for (const rowId of affectedRowIds) {
1270 const activeConditions = rowActiveConditions.get(rowId)
1271 if (activeConditions) {
1272 activeConditions[pattern.pos] = true
1273 }
1274 }
1275 }
1276 }
1277
1278 /**
1279 * Get the sync metadata for insert operations

Callers 1

createElectricSyncFunction · 0.85

Calls 3

findRowsMatchingPatternFunction · 0.90
debugFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected