add docs
This commit is contained in:
@ -29,12 +29,12 @@ in the end all parent (main) models should be unique.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `result_rows (List["Model"])`: list of already initialized Models with child models
|
||||
populated, each instance is one row in db and some models can duplicate
|
||||
- `result_rows` (`List["Model"]`): list of already initialized Models with child models
|
||||
|
||||
**Returns**:
|
||||
|
||||
`(List["Model"])`: list of merged models where each main model is unique
|
||||
`List["Model"]`: list of merged models where each main model is unique
|
||||
|
||||
<a name="models.mixins.merge_mixin.MergeModelMixin.merge_two_instances"></a>
|
||||
#### merge\_two\_instances
|
||||
@ -51,13 +51,13 @@ If needed it's calling itself recurrently and merges also children models.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `relation_map (Dict)`: map of models relations to follow
|
||||
- `one (Model)`: previous model instance
|
||||
- `other (Model)`: current model instance
|
||||
- `relation_map` (`Dict`): map of models relations to follow
|
||||
- `one` (`Model`): previous model instance
|
||||
- `other` (`Model`): current model instance
|
||||
|
||||
**Returns**:
|
||||
|
||||
`(Model)`: current Model instance with data merged from previous one.
|
||||
`Model`: current Model instance with data merged from previous one.
|
||||
|
||||
<a name="models.mixins.merge_mixin.MergeModelMixin._merge_items_lists"></a>
|
||||
#### \_merge\_items\_lists
|
||||
@ -77,12 +77,12 @@ If one's model is not in other it's simply appended to the list.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `field_name (str)`: name of the current relation field
|
||||
- `current_field (List[Model])`: list of nested models from one model
|
||||
- `other_value (List[Model])`: list of nested models from other model
|
||||
- `relation_map (Dict)`: map of relations to follow
|
||||
- `field_name` (`str`): name of the current relation field
|
||||
- `current_field` (`List[Model]`): list of nested models from one model
|
||||
- `other_value` (`List[Model]`): list of nested models from other model
|
||||
- `relation_map` (`Dict`): map of relations to follow
|
||||
|
||||
**Returns**:
|
||||
|
||||
`(List[Model])`: merged list of models
|
||||
`List[Model]`: merged list of models
|
||||
|
||||
|
||||
Reference in New Issue
Block a user