- xrange(+Redis, +Key:atom, -Entries:list, +Options:list) is det
- Applies range selection to Key stream. Options optionally specify
the start and end stream identifiers, defaulting to
-
and +
respectively or in reverse if rev(true)
included in Options list;
the plus stream identifier stands for the maximum identifier, or
the newest, whereas the minus identifier stands for the oldest.
Option count(Count)
limits the number of entries to read by
Count items.
The following always unifies Entries with []
.
xrange(Server, Key, Entries, [start(+)]).
xrange(Server, Key, Entries, [rev(true), start(-)]).
- xread(+Redis, +Streams:dict, -Reads:list, +Options:list) is semidet
- Unifies Reads from Streams. Fails on time-out, if option
block(Milliseconds)
specifies a non-zero blocking delay.
- Arguments:
-
Reads | - by stream key. The reply has the form [Key, Entries]
for each stream where each member of Entries has the form
[StreamID, Fields] where Fields is an array of keys and values. |
- xread_call(+Redis, +Streams, :Goal, -Fields, +Options) is semidet
- xread_call(+Redis, +Streams, :Goal, ?Tag, -Fields, +Options) is semidet
- Reads Streams continuously until Goal succeeds or times out. Also
supports a Redis time limit option so that blocking, if used, does
not continue indefinately even on a very busy stream set. The limit
applies to any of the given streams; it acts as a time threshold
for continuous blocking failures.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- xread_call(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)