MCPcopy
hub / github.com/django/django / process_rhs

Method process_rhs

django/db/models/lookups.py:441–452  ·  view source on GitHub ↗
(self, compiler, connection)

Source from the content-addressed store, hash-verified

439 overflow_exception = EmptyResultSet
440
441 def process_rhs(self, compiler, connection):
442 rhs = self.rhs
443 if isinstance(rhs, int):
444 field_internal_type = self.lhs.output_field.get_internal_type()
445 min_value, max_value = connection.ops.integer_field_range(
446 field_internal_type
447 )
448 if min_value is not None and rhs < min_value:
449 raise self.underflow_exception
450 if max_value is not None and rhs > max_value:
451 raise self.overflow_exception
452 return super().process_rhs(compiler, connection)
453
454
455class IntegerFieldFloatRounding:

Callers

nothing calls this directly

Calls 3

get_internal_typeMethod · 0.45
integer_field_rangeMethod · 0.45
process_rhsMethod · 0.45

Tested by

no test coverage detected