scan_apply {redux} | R Documentation |
Iterate over keys using SCAN
Description
Support for iterating with SCAN
. Note that this will
generalise soon to support collecting output, SSCAN
and
other variants, etc.
Usage
scan_apply(
con,
callback,
pattern = NULL,
...,
count = NULL,
type = "SCAN",
key = NULL
)
scan_del(con, pattern, count = NULL, type = "SCAN", key = NULL)
scan_find(con, pattern, count = NULL, type = "SCAN", key = NULL)
Arguments
con |
A |
callback |
Function that takes a character vector of keys and
does something useful to it. |
pattern |
Optional pattern to use. |
... |
additional arguments passed through to |
count |
Optional step size (default is Redis' default which is 10) |
type |
Type of SCAN to run. Options are |
key |
Key to use when running a hash, set or sorted set scan. |
Details
The functions scan_del
and scan_find
are example
functions that delete and find all keys corresponding to a given
pattern.