RedisLabsModules / redismodule-rs

Rust API for Redis Modules API
BSD 3-Clause "New" or "Revised" License
269 stars 64 forks source link

Support firstkey, lastkey, and keystep in redis_module! and redis_command! macros #64

Closed grippy closed 4 years ago

grippy commented 4 years ago

These values are currently hardcoded to 1. We should be able to configure these variables when calling the redis_module! macro.

grippy commented 4 years ago

https://github.com/RedisLabsModules/redismodule-rs/pull/63

messense commented 4 years ago

What does firstkey, lastkey, and keystep do? I can't find any docs about them.

gavrie commented 4 years ago

What does firstkey, lastkey, and keystep do? I can't find any docs about them.

@messense You're quite right; the official Redis module API docs don't explain. These parameters specify which of the arguments to the command are Redis keys: the index of the first argument that is a key, the last one, and the step (for commands like MSET that interleave keys and values).