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

Function remove

core/client.ts:155–174  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

153 });
154 },
155 remove(id) {
156 return runInAction(() => {
157 const entity = store.findById(id);
158
159 const didRemove = store.remove(id);
160
161 if (!didRemove) return false;
162
163 events.emit("removed", {
164 db,
165 entity: entity!,
166 type: "removed",
167 rollback() {
168 store.add(entity!);
169 },
170 });
171
172 return didRemove;
173 });
174 },
175 update(id, input) {
176 return runInAction(() => {
177 const updateEvent = store.update(id, input);

Callers

nothing calls this directly

Calls 2

findByIdMethod · 0.80
removeMethod · 0.65

Tested by

no test coverage detected