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

Method _get_aggregate_result

redis/commands/search/commands.py:1391–1411  ·  view source on GitHub ↗
(
        self, raw: List, query: Union[AggregateRequest, Cursor], has_cursor: bool
    )

Source from the content-addressed store, hash-verified

1389 )
1390
1391 def _get_aggregate_result(
1392 self, raw: List, query: Union[AggregateRequest, Cursor], has_cursor: bool
1393 ):
1394 if has_cursor:
1395 if isinstance(query, Cursor):
1396 query.cid = raw[1]
1397 cursor = query
1398 else:
1399 cursor = Cursor(raw[1])
1400 raw = raw[0]
1401 else:
1402 cursor = None
1403
1404 if isinstance(query, AggregateRequest) and query._with_schema:
1405 schema = raw[0]
1406 rows = raw[2:]
1407 else:
1408 schema = None
1409 rows = raw[1:]
1410
1411 return AggregateResult(rows, cursor, schema)
1412
1413 def profile(
1414 self,

Callers 3

_parse_aggregateMethod · 0.95
_parse_profileMethod · 0.95

Calls 2

CursorClass · 0.85
AggregateResultClass · 0.85

Tested by

no test coverage detected