(id)
| 291 | return store.query(filter).first; |
| 292 | }, |
| 293 | remove(id) { |
| 294 | db.utils.assertNotDestroyed("Cannot remove items"); |
| 295 | const entity = itemsMap[id] ?? null; |
| 296 | |
| 297 | if (entity === null) return false; |
| 298 | |
| 299 | let didRemove = false; |
| 300 | |
| 301 | runInAction(() => { |
| 302 | entity.cleanup.clean(); |
| 303 | didRemove = items.remove(entity); |
| 304 | delete itemsMap[id]; |
| 305 | removeEntityFromIndexes(entity); |
| 306 | }); |
| 307 | |
| 308 | return didRemove; |
| 309 | }, |
| 310 | query(filter, sort) { |
| 311 | return createOrReuseQuery(filter, sort); |
| 312 | }, |
nothing calls this directly
no test coverage detected