Class ArGrepCommandKt
-
- All Implemented Interfaces:
public final class ArGrepCommandKt
-
-
Method Summary
Modifier and Type Method Description final static RedisRequestargrepCommand(String key, Long start, Long end, Collection<Pair<ArGrepPredicate, StreamWithLength>> predicates, ArGrepCombine combine, Long limit, Boolean nocase, Function1<List<Long>, Unit> onResult)final static RedisRequestargrepWithValuesCommand(String key, Long start, Long end, Collection<Pair<ArGrepPredicate, StreamWithLength>> predicates, ArGrepCombine combine, Long limit, Boolean nocase, IndexedElementSink<StreamWithLength> sink)Same as argrepCommand, but with the value of each matching element. -
-
Method Detail
-
argrepCommand
final static RedisRequest argrepCommand(String key, Long start, Long end, Collection<Pair<ArGrepPredicate, StreamWithLength>> predicates, ArGrepCombine combine, Long limit, Boolean nocase, Function1<List<Long>, Unit> onResult)
- Parameters:
start-inclusive, may be greater than end to search in reverse order
end-inclusive
predicates-one or more predicates the value of an element is tested against
combine-optional, how multiple predicates are combined (defaults to OR)
limit-optional, the maximum number of matches to return
nocase-if true, the predicates are case-insensitive
onResult-called with the indices of the matching elements (empty if the key does not exist)
-
argrepWithValuesCommand
final static RedisRequest argrepWithValuesCommand(String key, Long start, Long end, Collection<Pair<ArGrepPredicate, StreamWithLength>> predicates, ArGrepCombine combine, Long limit, Boolean nocase, IndexedElementSink<StreamWithLength> sink)
Same as argrepCommand, but with the value of each matching element.
- Parameters:
sink-called once per matching element. The stream is read directly from the connection and is only valid until the callback returns, unread parts are skipped.
-
-
-
-