MCPcopy Create free account
hub / github.com/F-Stack/f-stack / streamDeleteItem

Function streamDeleteItem

app/redis-6.2.6/src/t_stream.c:1322–1334  ·  view source on GitHub ↗

Delete the specified item ID from the stream, returning 1 if the item * was deleted 0 otherwise (if it does not exist). */

Source from the content-addressed store, hash-verified

1320/* Delete the specified item ID from the stream, returning 1 if the item
1321 * was deleted 0 otherwise (if it does not exist). */
1322int streamDeleteItem(stream *s, streamID *id) {
1323 int deleted = 0;
1324 streamIterator si;
1325 streamIteratorStart(&si,s,id,id,0);
1326 streamID myid;
1327 int64_t numfields;
1328 if (streamIteratorGetID(&si,&myid,&numfields)) {
1329 streamIteratorRemoveEntry(&si,&myid);
1330 deleted = 1;
1331 }
1332 streamIteratorStop(&si);
1333 return deleted;
1334}
1335
1336/* Get the last valid (non-tombstone) streamID of 's'. */
1337void streamLastValidID(stream *s, streamID *maxid)

Callers 2

RM_StreamDeleteFunction · 0.85
xdelCommandFunction · 0.85

Calls 4

streamIteratorStartFunction · 0.85
streamIteratorGetIDFunction · 0.85
streamIteratorStopFunction · 0.85

Tested by

no test coverage detected