MCPcopy Index your code
hub / github.com/ormar-orm/ormar / max

Method max

ormar/queryset/queryset.py:826–836  ·  view source on GitHub ↗

Returns max value of columns for rows matching the given criteria (applied with `filter` and `exclude` if set before). :return: max value of column(s) :rtype: Any

(self, columns: Union[str, list[str]])

Source from the content-addressed store, hash-verified

824 return dict(result) if len(result) > 1 else result[columns[0]] # type: ignore
825
826 async def max(self, columns: Union[str, list[str]]) -> Any: # noqa: A003
827 """
828 Returns max value of columns for rows matching the given criteria
829 (applied with `filter` and `exclude` if set before).
830
831 :return: max value of column(s)
832 :rtype: Any
833 """
834 if not isinstance(columns, list):
835 columns = [columns]
836 return await self._query_aggr_function(func_name="max", columns=columns)
837
838 async def min(self, columns: Union[str, list[str]]) -> Any: # noqa: A003
839 """

Callers 7

test_max_methodFunction · 0.45
test_queryset_methodFunction · 0.45
aggregationsFunction · 0.45
max_Function · 0.45

Calls 1

_query_aggr_functionMethod · 0.95

Tested by 6

test_max_methodFunction · 0.36
test_queryset_methodFunction · 0.36
max_Function · 0.36