MCPcopy
hub / github.com/django/django / get_db_prep_save

Method get_db_prep_save

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

Return field's value prepared for saving into a database.

(self, value, connection)

Source from the content-addressed store, hash-verified

1045 return value
1046
1047 def get_db_prep_save(self, value, connection):
1048 """Return field's value prepared for saving into a database."""
1049 if hasattr(value, "as_sql"):
1050 return value
1051 return self.get_db_prep_value(value, connection=connection, prepared=False)
1052
1053 def has_default(self):
1054 """Return a boolean of whether this field has a default value."""

Callers 4

effective_defaultMethod · 0.45
as_sqlMethod · 0.45
prepare_valueMethod · 0.45
as_sqlMethod · 0.45

Calls 1

get_db_prep_valueMethod · 0.95

Tested by

no test coverage detected