【发布时间】:2017-10-18 17:38:41
【问题描述】:
如何检查哈希中的键是否存在(redis)?
我试过这样:
redisClient.exists(obj.mydict.user.toString().pos, function(err,reply) {
if(!err) {
if(reply !== null) {
...
但是我得到了:
node_redis: Deprecated: The EXISTS command contains a "undefined" argument.
This is converted to a "undefined" string now and will return an error from v.3.0 on.
Please handle this in your code to make sure everything works as you intended it to.
我不知道怎么做。我正在尝试检查我的 .pos 密钥是否存在于我的哈希 obj.mydict.user.toString() 中,它会如何在 node_redis?
【问题讨论】:
标签: javascript redis node-redis