• Angus Pearson's avatar
    Implement `SCAN cursor [TYPE type]` modifier suggested in issue #6107. · bf963253
    Angus Pearson authored
    Add tests to check basic functionality of this optional keyword, and also tested with
    a module (redisgraph). Checked quickly with valgrind, no issues.
    
    Copies name the type name canonicalisation code from `typeCommand`, perhaps this would
    be better factored out to prevent the two diverging and both needing to be edited to
    add new `OBJ_*` types, but this is a little fiddly with C strings.
    
    The [redis-doc](https://github.com/antirez/redis-doc/blob/master/commands.json) repo
    will need to be updated with this new arg if accepted.
    
    A quirk to be aware of here is that the GEO commands are backed by zsets not their own
    type, so they're not distinguishable from other zsets.
    
    Additionally, for sparse types this has the same behaviour as `MATCH` in that it may
    return many empty results before giving something, even for large `COUNT`s.
    bf963253
db.c 53.7 KB