MCPcopy
hub / github.com/django/django / get_db_prep_value

Method get_db_prep_value

django/db/models/fields/__init__.py:1580–1584  ·  view source on GitHub ↗
(self, value, connection, prepared=False)

Source from the content-addressed store, hash-verified

1578 return self.to_python(value)
1579
1580 def get_db_prep_value(self, value, connection, prepared=False):
1581 # Casts dates into the format expected by the backend
1582 if not prepared:
1583 value = self.get_prep_value(value)
1584 return connection.ops.adapt_datefield_value(value)
1585
1586 def value_to_string(self, obj):
1587 val = self.value_from_object(obj)

Callers

nothing calls this directly

Calls 2

get_prep_valueMethod · 0.95
adapt_datefield_valueMethod · 0.45

Tested by

no test coverage detected