openresty / openresty/lua-resty-redis

about hmget & hmset

Open
#58 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
2k
Forks
447
Avg merge
2h 24m
Merged PRs (30d)
3

Description

local res, err hmget(mykey, "one", "two", "three")

then
res.one (not worked)

when mykey not exists,the below code not worked

if (res[2] ~= nil) then
    ngx.say('exists') -- when mykey not exists, this line would output
end

and the type of mykey is userdata, how can i convert it to table?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names the hmget and hmset operations but provides no source file or test to start from. Reproduce the reported res.one and missing-key behavior with a nonexistent mykey, then inspect the library entry points for these commands. Done means the return shape and missing-key behavior are understood and the issue's expected result is recorded or tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, redis
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.