MCPcopy
hub / github.com/tortoise/tortoise-orm / _get_function_field

Method _get_function_field

tortoise/expressions.py:624–630  ·  view source on GitHub ↗
(  # type:ignore[override]
        self, field: ArithmeticExpression | PypikaField | str, *default_values
    )

Source from the content-addressed store, hash-verified

622 self.filter = _filter
623
624 def _get_function_field( # type:ignore[override]
625 self, field: ArithmeticExpression | PypikaField | str, *default_values
626 ) -> DistinctOptionFunction:
627 function = cast(DistinctOptionFunction, self.database_func(field, *default_values))
628 if self.distinct:
629 function = function.distinct()
630 return function
631
632 def _resolve_nested_field(self, resolve_context: ResolveContext, field: str) -> ResolveResult:
633 ret = super()._resolve_nested_field(resolve_context, field)

Callers

nothing calls this directly

Calls 1

distinctMethod · 0.80

Tested by

no test coverage detected