MCPcopy
hub / github.com/redis/redis-py / _mk_query_args

Method _mk_query_args

redis/commands/search/commands.py:1235–1249  ·  view source on GitHub ↗
(
        self, query, query_params: Optional[Dict[str, Union[str, int, float, bytes]]]
    )

Source from the content-addressed store, hash-verified

1233 return args
1234
1235 def _mk_query_args(
1236 self, query, query_params: Optional[Dict[str, Union[str, int, float, bytes]]]
1237 ):
1238 args = [self.index_name]
1239
1240 if isinstance(query, str):
1241 # convert the query from a text to a query object
1242 query = Query(query)
1243 if not isinstance(query, Query):
1244 raise ValueError(f"Bad query type {type(query)}")
1245
1246 args += query.get_args()
1247 args += self.get_params_args(query_params)
1248
1249 return args, query
1250
1251 def search(
1252 self,

Callers 3

searchMethod · 0.95
explainMethod · 0.95
searchMethod · 0.80

Calls 3

get_argsMethod · 0.95
get_params_argsMethod · 0.95
QueryClass · 0.85

Tested by

no test coverage detected