-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
The mget method has two parameters:
/**
* Returns the values of all specified keys. For every key that does not hold a string value or does not
* exist, the special value nil is returned. Because of this, the operation never fails.
*
* @param key The key.
* @param keys The other key.
* @returns List of values at the specified keys.
*/
public mget(key: string, ...keys: string[]) {
return this.command<Array<string | number | null>>("MGET", key, ...keys);
}But shouldn't it be only one? this just seems weird and is very bad to use this method, having to do something like this:
public async getManyObjects (keys: string[]) {
return tedisClient.mget('_', ...keys).then(list => list.slice(1))
}Suggested behaviour
I would suggest to remove or concat the first key parameter, so we could use it like this:
public async getManyObjects (keys: string[]) {
return tedisClient.mget(...keys)
}Metadata
Metadata
Assignees
Labels
No labels