Available since 1.0.0.

MGET key [key ...]

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.

Return value

Array reply: list of values at the specified keys.

Examples

redis> SET key1 "Hello"
"OK"
redis> SET key2 "World"
"OK"
redis> MGET key1 key2 nonexisting
1) "Hello"
2) "World"
3) (nil)
redis>

Hierarchy

Constructors

Properties

blocking?: boolean
dataType?: DataType

Used for "database" commands to enforce type checking.

dbDataType: DataType = DataType.STRING
logger: Logger = ...
maxParams: number = -1

Maximum number of parameters allowed. -1 for no maximum.

minParams: number = 1

Minimum number of parameters require.

name: string = "mget"
pubSubAllowed?: boolean

Used when PUB/SUB is in effect.

sign?: number

Sign is used in commands with a compliment command. The only current example is INCR/DECR. Sign is 1 for INCR and -1 for DECR

txIgnore?: boolean

Used in transactions to enqueue a command.

Methods