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

Method get_db_prep_value

django/db/models/fields/__init__.py:1036–1045  ·  view source on GitHub ↗

Return field's value prepared for interacting with the database backend. Used by the default implementations of get_db_prep_save().

(self, value, connection, prepared=False)

Source from the content-addressed store, hash-verified

1034 return value
1035
1036 def get_db_prep_value(self, value, connection, prepared=False):
1037 """
1038 Return field's value prepared for interacting with the database
1039 backend.
1040
1041 Used by the default implementations of get_db_prep_save().
1042 """
1043 if not prepared:
1044 value = self.get_prep_value(value)
1045 return value
1046
1047 def get_db_prep_save(self, value, connection):
1048 """Return field's value prepared for saving into a database."""

Callers 7

get_db_prep_saveMethod · 0.95
as_sqlMethod · 0.45
as_sqlMethod · 0.45
get_db_prep_valueMethod · 0.45
get_db_prep_valueMethod · 0.45
get_db_prep_valueMethod · 0.45

Calls 1

get_prep_valueMethod · 0.95

Tested by

no test coverage detected