MCPcopy Create free account
hub / github.com/clientdb/clientdb / updateEntityIndexes

Function updateEntityIndexes

core/store.ts:177–186  ·  view source on GitHub ↗
(
    entity: StoreEntity,
    changedKeys?: Array<keyof Data>
  )

Source from the content-addressed store, hash-verified

175 }
176
177 function updateEntityIndexes(
178 entity: StoreEntity,
179 changedKeys?: Array<keyof Data>
180 ) {
181 for (const [indexKey, index] of propIndexMap.entries()) {
182 if (changedKeys && !changedKeys.includes(indexKey as keyof Data))
183 continue;
184 index.update(entity);
185 }
186 }
187
188 function removeEntityFromIndexes(entity: StoreEntity) {
189 for (const [indexKey, index] of propIndexMap.entries()) {

Callers 2

updateFunction · 0.85
addFunction · 0.85

Calls 1

updateMethod · 0.65

Tested by

no test coverage detected