@@ -45,6 +45,9 @@ groupCmds (Cmds cmds) =
45
45
, " connection"
46
46
, " server"
47
47
, " scripting"
48
+ -- not implemented:
49
+ -- , "cluster"
50
+ -- , "geo"
48
51
]
49
52
50
53
-- | Blacklisted commands, optionally paired with the name of their
@@ -78,6 +81,39 @@ blacklist = [ manual "AUTH" ["auth"]
78
81
[" zrevrangebyscore" , " zrevrangebyscoreWithscores"
79
82
," zrevrangebyscoreLimit" , " zrevrangebyscoreWithscoresLimit" ]
80
83
, manual " ZUNIONSTORE" [" zunionstore" ," zunionstoreWeights" ]
84
+ , manualWithType " SET"
85
+ [" set" , " setOpts" ]
86
+ [" Condition" , " SetOpts(..)" ]
87
+ , manualWithType " ZADD"
88
+ [" zadd" , " zaddOpts" ]
89
+ [" ZaddOpts(..)" ]
90
+ , manualWithType " MIGRATE"
91
+ [" migrate" , " migrateMultiple" ]
92
+ [" MigrateOpts(..)" ]
93
+ , manual " RESTORE"
94
+ [" restore" , " restoreReplace" ]
95
+ , manualWithType " CLIENT REPLY"
96
+ [" clientReply" ]
97
+ [" ReplyMode" ]
98
+ , manualWithType " SCRIPT DEBUG"
99
+ [" scriptDebug" ]
100
+ [" DebugMode" ]
101
+ , manual " SRANDMEMBER" [" srandmember" , " srandmemberN" ]
102
+ , manual " SPOP" [" spop" ]
103
+ , manual " INFO" [" info" , " infoSection" ]
104
+ , manual " EXISTS" [" exists" ]
105
+ , unimplemented " COMMAND"
106
+ , unimplemented " COMMAND GETKEYS"
107
+ , unimplemented " ROLE"
108
+ , unimplemented " CLIENT KILL"
109
+ , unimplemented " SCAN"
110
+ , unimplemented " SSCAN"
111
+ , unimplemented " HSCAN"
112
+ , unimplemented " ZSCAN"
113
+ , unimplemented " ZRANGEBYLEX"
114
+ , unimplemented " ZREVRANGEBYLEX"
115
+ , unimplemented " ZRANGEBYSCORE"
116
+ , unimplemented " ZREVRANGEBYSCORE"
81
117
, unimplemented " MONITOR" -- debugging command
82
118
, unimplemented " SYNC" -- internal command
83
119
, unimplemented " SHUTDOWN" -- kills server, throws exception
@@ -101,7 +137,7 @@ data Cmd = Cmd { cmdName, cmdGroup :: String
101
137
, cmdRetType :: Maybe String
102
138
, cmdArgs :: [Arg ]
103
139
, cmdSummary :: String
104
- , cmdSince :: String
140
+ , cmdSince :: Maybe String
105
141
}
106
142
deriving (Show )
107
143
@@ -124,7 +160,7 @@ instance FromJSON Cmds where
124
160
cmdGroup <- cmd .: " group"
125
161
cmdRetType <- cmd .:? " returns"
126
162
cmdSummary <- cmd .: " summary"
127
- cmdSince <- cmd .: " since"
163
+ cmdSince <- cmd .:? " since"
128
164
cmdArgs <- cmd .:? " arguments" .!= []
129
165
<|> error (" failed to parse args: " ++ cmdName)
130
166
return Cmd {.. })
@@ -273,7 +309,9 @@ exportCmdNames Cmd{..} = types `mappend` functions
273
309
, fromString " '."
274
310
]
275
311
else mempty
276
- , fromString " Since Redis " , fromString cmdSince
312
+ , case cmdSince of
313
+ Just ver -> mconcat [fromString " Since Redis " , fromString ver]
314
+ Nothing -> fromString " In unstable version of Redis"
277
315
]
278
316
279
317
cmdDescriptionLink :: String -> Builder
@@ -381,6 +419,7 @@ argumentType a = mconcat [ go a
381
419
go (Pair a a') =
382
420
mconcat [fromString " (" , go a, fromString " ," , go a', fromString " )" ]
383
421
go a@ Arg {.. } = translateArgType a
422
+ go a = error (" failed to user argument type: " ++ show a)
384
423
385
424
translateArgType Arg {.. } = fromString $ case argType of
386
425
" integer" -> " Integer"
0 commit comments