new Response()
The response received from the REDIS server. Redis responses can have several representations:
- simple string - C string
- integer - 64bit integer value
- bulk - byte array
- multi - list
- Source:
Methods
get(key) → {Response}
Get this multi response value at a string key. Note that REDIS does not support strings as keys but by convention
it encodes hashes in lists where index i is the key, and index i+1 is the value.
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | the required key. |
- Source:
Returns:
Response value.
- Type
- Response
getKeys() → {Array.<string>}
Get this multi response keys from a hash. Note that REDIS does not support strings as keys but by convention
it encodes hashes in lists where index i is the key, and index i+1 is the value.
- Source:
Returns:
the set of keys.
- Type
- Array.<string>
size() → {number}
Get this size of this multi response.
- Source:
Returns:
the size of the multi.
- Type
- number
toBoolean() → {boolean}
Get this response as a Boolean.
- Source:
Returns:
boolean value.
- Type
- boolean
toBuffer() → {Buffer}
Get this response as Buffer.
- Source:
Returns:
buffer value.
- Type
- Buffer
toByte() → {number}
Get this response as a Byte.
- Source:
Returns:
byte value.
- Type
- number
toInteger() → {number}
Get this response as a Integer.
- Source:
Returns:
int value.
- Type
- number
toLong() → {number}
Get this response as a Long.
- Source:
Returns:
long value.
- Type
- number
toShort() → {number}
Get this response as a Short.
- Source:
Returns:
short value.
- Type
- number
toString() → {string}
Get this response as a String.
- Source:
Returns:
string value
- Type
- string
type() → {Object}
The response return type.
- Source:
Returns:
the type.
- Type
- Object