MCPcopy
hub / github.com/django/django / composite_fields_to_tuples

Method composite_fields_to_tuples

django/db/models/sql/compiler.py:1551–1562  ·  view source on GitHub ↗
(self, rows, expressions)

Source from the content-addressed store, hash-verified

1549 return any(isinstance(expression, ColPairs) for expression in expressions)
1550
1551 def composite_fields_to_tuples(self, rows, expressions):
1552 col_pair_slices = [
1553 slice(i, i + len(expression))
1554 for i, expression in enumerate(expressions)
1555 if isinstance(expression, ColPairs)
1556 ]
1557
1558 for row in map(list, rows):
1559 for pos in col_pair_slices:
1560 row[pos] = (tuple(row[pos]),)
1561
1562 yield row
1563
1564 def results_iter(
1565 self,

Callers 3

results_iterMethod · 0.95
__iter__Method · 0.80
get_aggregationMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected