Skip to content

Commit

Permalink
added command meta data for LRANGE (#1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
shashi-sah2003 authored Nov 13, 2024
1 parent 9c35e90 commit 5d20e1e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
12 changes: 10 additions & 2 deletions internal/server/cmd_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,14 @@ var (
Cmd: "HMGET",
CmdType: SingleShard,
}
lrangeCmdMeta = CmdsMeta{
Cmd: "LRANGE",
CmdType: SingleShard,
}
linsertCmdMeta = CmdsMeta{
Cmd: "LINSERT",
CmdType: SingleShard,
}
lpushCmdMeta = CmdsMeta{
Cmd: "LPUSH",
CmdType: SingleShard,
Expand All @@ -366,7 +374,6 @@ var (
Cmd: "LLEN",
CmdType: SingleShard,
}

jsonForgetCmdMeta = CmdsMeta{
Cmd: "JSON.FORGET",
CmdType: SingleShard,
Expand Down Expand Up @@ -490,12 +497,13 @@ func init() {
WorkerCmdsMeta["BITFIELD"] = bitfieldCmdMeta
WorkerCmdsMeta["BITPOS"] = bitposCmdMeta
WorkerCmdsMeta["BITFIELD_RO"] = bitfieldroCmdMeta
WorkerCmdsMeta["LRANGE"] = lrangeCmdMeta
WorkerCmdsMeta["LINSERT"] = linsertCmdMeta
WorkerCmdsMeta["LPUSH"] = lpushCmdMeta
WorkerCmdsMeta["RPUSH"] = rpushCmdMeta
WorkerCmdsMeta["LPOP"] = lpopCmdMeta
WorkerCmdsMeta["RPOP"] = rpopCmdMeta
WorkerCmdsMeta["LLEN"] = llenCmdMeta

WorkerCmdsMeta["JSON.FORGET"] = jsonForgetCmdMeta
WorkerCmdsMeta["JSON.DEL"] = jsonDelCmdMeta
WorkerCmdsMeta["JSON.TOGGLE"] = jsonToggleCmdMeta
Expand Down
8 changes: 8 additions & 0 deletions internal/worker/cmd_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ const (
CmdJSONArrAppend = "JSON.ARRAPPEND"
CmdJSONArrLen = "JSON.ARRLEN"
CmdJSONArrPop = "JSON.ARRPOP"
CmdLrange = "LRANGE"
CmdLinsert = "LINSERT"
CmdJSONForget = "JSON.FORGET"
CmdJSONDel = "JSON.DEL"
CmdJSONToggle = "JSON.TOGGLE"
Expand Down Expand Up @@ -302,6 +304,12 @@ var CommandsMeta = map[string]CmdMeta{
CmdBitFieldRO: {
CmdType: SingleShard,
},
CmdLrange: {
CmdType: SingleShard,
},
CmdLinsert: {
CmdType: SingleShard,
},
CmdJSONForget: {
CmdType: SingleShard,
},
Expand Down

0 comments on commit 5d20e1e

Please sign in to comment.