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

Function streamTrimByID

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

Trims a stream by minimum ID. Returns the number of deleted items. */

Source from the content-addressed store, hash-verified

878
879/* Trims a stream by minimum ID. Returns the number of deleted items. */
880int64_t streamTrimByID(stream *s, streamID minid, int approx) {
881 streamAddTrimArgs args = {
882 .trim_strategy = TRIM_STRATEGY_MINID,
883 .approx_trim = approx,
884 .limit = approx ? 100 * server.stream_node_max_entries : 0,
885 .minid = minid
886 };
887 return streamTrim(s, &args);
888}
889
890/* Parse the arguments of XADD/XTRIM.
891 *

Callers 1

RM_StreamTrimByIDFunction · 0.85

Calls 1

streamTrimFunction · 0.85

Tested by

no test coverage detected