MCPcopy
hub / github.com/chartbrew/chartbrew / zrem

Method zrem

server/modules/runtimeCache.js:234–250  ·  view source on GitHub ↗
(key, ...members)

Source from the content-addressed store, hash-verified

232 }
233
234 async zrem(key, ...members) {
235 const sortedSet = this.sortedSets.get(key);
236 if (!sortedSet) return 0;
237
238 let removedCount = 0;
239 members.forEach((member) => {
240 if (sortedSet.delete(member)) {
241 removedCount += 1;
242 }
243 });
244
245 if (sortedSet.size === 0) {
246 this.sortedSets.delete(key);
247 }
248
249 return removedCount;
250 }
251
252 async zcard(key) {
253 const sortedSet = this.sortedSets.get(key);

Callers 4

zremrangebyrankMethod · 0.95
createMemoryStoreFunction · 0.95
createRedisStoreFunction · 0.95
attachClientFunction · 0.80

Calls 2

getMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected