MCPcopy
hub / github.com/django/django / db_parameters

Method db_parameters

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

Extension of db_type(), providing a range of different return values (type, checks). This will look at db_type(), allowing custom model fields to override it.

(self, connection)

Source from the content-addressed store, hash-verified

941 return self.db_type(connection)
942
943 def db_parameters(self, connection):
944 """
945 Extension of db_type(), providing a range of different return values
946 (type, checks). This will look at db_type(), allowing custom model
947 fields to override it.
948 """
949 type_string = self.db_type(connection)
950 check_string = self.db_check(connection)
951 return {
952 "type": type_string,
953 "check": check_string,
954 }
955
956 def db_type_suffix(self, connection):
957 return connection.data_types_suffix.get(self.get_internal_type())

Callers 15

remove_fieldMethod · 0.45
table_sqlMethod · 0.45
column_sqlMethod · 0.45
create_modelMethod · 0.45
add_fieldMethod · 0.45
remove_fieldMethod · 0.45
alter_fieldMethod · 0.45
_alter_fieldMethod · 0.45

Calls 2

db_typeMethod · 0.95
db_checkMethod · 0.95