MCPcopy Create free account
hub / github.com/redis/RedisInsight / checkCommandModule

Function checkCommandModule

redisinsight/ui/src/utils/cliHelper.tsx:164–186  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

162 )
163
164const checkCommandModule = (command: string) => {
165 switch (true) {
166 case command.startsWith(ModuleCommandPrefix.RediSearch): {
167 return RedisDefaultModules.Search
168 }
169 case command.startsWith(ModuleCommandPrefix.JSON): {
170 return RedisDefaultModules.ReJSON
171 }
172 case command.startsWith(ModuleCommandPrefix.TimeSeries): {
173 return RedisDefaultModules.TimeSeries
174 }
175 case command.startsWith(ModuleCommandPrefix.BF):
176 case command.startsWith(ModuleCommandPrefix.CF):
177 case command.startsWith(ModuleCommandPrefix.CMS):
178 case command.startsWith(ModuleCommandPrefix.TDIGEST):
179 case command.startsWith(ModuleCommandPrefix.TOPK): {
180 return RedisDefaultModules.Bloom
181 }
182 default: {
183 return null
184 }
185 }
186}
187
188const getUnsupportedModulesFromQuery = (
189 loadedModules: AdditionalRedisModule[],

Callers 2

cliHelper.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected