RefForeignKey
class¶
edgy.RefForeignKey
¶
Bases: ForeignKeyFieldFactory
, list
methods_overwritable_by_factory
class-attribute
instance-attribute
¶
methods_overwritable_by_factory = frozenset(default_methods_overwritable_by_factory)
build_field
classmethod
¶
build_field(**kwargs)
PARAMETER | DESCRIPTION |
---|---|
**kwargs |
TYPE:
|
Source code in edgy/core/db/fields/factories.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|
overwrite_methods
classmethod
¶
overwrite_methods(field_obj)
Called in metaclasses
PARAMETER | DESCRIPTION |
---|---|
field_obj |
TYPE:
|
Source code in edgy/core/db/fields/factories.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
repack
classmethod
¶
repack(field_obj)
PARAMETER | DESCRIPTION |
---|---|
field_obj |
TYPE:
|
Source code in edgy/core/db/fields/factories.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
validate
classmethod
¶
validate(kwargs)
default validation useful for one_to_one and foreign_key
PARAMETER | DESCRIPTION |
---|---|
kwargs |
TYPE:
|
Source code in edgy/core/db/fields/factories.py
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
|
get_constraints
classmethod
¶
get_constraints(**kwargs)
Returns the propery column type for the field, None for Metafields
PARAMETER | DESCRIPTION |
---|---|
**kwargs |
TYPE:
|
Source code in edgy/core/db/fields/factories.py
129 130 131 132 |
|
get_column_type
classmethod
¶
get_column_type(**kwargs)
Returns the propery column type for the field, None for Metafields
PARAMETER | DESCRIPTION |
---|---|
**kwargs |
TYPE:
|
Source code in edgy/core/db/fields/factories.py
134 135 136 137 |
|
get_pydantic_type
classmethod
¶
get_pydantic_type(**kwargs)
Returns the type for pydantic
PARAMETER | DESCRIPTION |
---|---|
**kwargs |
TYPE:
|
Source code in edgy/core/db/fields/factories.py
139 140 141 142 |
|
_get_field_cls
cached
staticmethod
¶
_get_field_cls()
Source code in edgy/core/db/fields/factories.py
144 145 146 147 |
|
modify_input
classmethod
¶
modify_input(field_obj, name, kwargs, original_fn=None)
PARAMETER | DESCRIPTION |
---|---|
field_obj |
TYPE:
|
name |
TYPE:
|
kwargs |
TYPE:
|
original_fn |
TYPE:
|
Source code in edgy/core/db/fields/ref_foreign_key.py
23 24 25 26 27 28 29 30 31 32 33 34 |
|
embed_field
¶
embed_field(prefix, new_fieldname, owner=None, parent=None)
PARAMETER | DESCRIPTION |
---|---|
prefix |
TYPE:
|
new_fieldname |
TYPE:
|
owner |
TYPE:
|
parent |
TYPE:
|
Source code in edgy/core/db/fields/ref_foreign_key.py
36 37 38 39 40 41 42 43 |
|
is_class_and_subclass
classmethod
¶
is_class_and_subclass(value, _type)
PARAMETER | DESCRIPTION |
---|---|
value |
TYPE:
|
_type |
TYPE:
|
Source code in edgy/core/db/fields/ref_foreign_key.py
45 46 47 48 49 50 51 52 53 54 55 56 |
|
post_save_callback
async
classmethod
¶
post_save_callback(obj, value, instance, force_insert, original_fn=None)
PARAMETER | DESCRIPTION |
---|---|
obj |
TYPE:
|
value |
TYPE:
|
instance |
TYPE:
|
force_insert |
TYPE:
|
original_fn |
TYPE:
|
Source code in edgy/core/db/fields/ref_foreign_key.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|