MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / __invert__

Method __invert__

tortoise/query_utils.py:224–230  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

222 return self.__class__(where_criterion, self.joins + other.joins, having_criterion)
223
224 def __invert__(self) -> QueryModifier:
225 where_criterion = having_criterion = None
226 if self.having_criterion:
227 having_criterion = (self.where_criterion & self.having_criterion).negate()
228 elif self.where_criterion:
229 where_criterion = self.where_criterion.negate()
230 return self.__class__(where_criterion, self.joins, having_criterion)
231
232
233class Prefetch:

Callers

nothing calls this directly

Calls 1

negateMethod · 0.80

Tested by

no test coverage detected