add docs
This commit is contained in:
@ -21,11 +21,11 @@ Checks if relation with given name is already registered.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `item (str)`: name of attribute
|
||||
- `item` (`str`): name of attribute
|
||||
|
||||
**Returns**:
|
||||
|
||||
`(bool)`: result of the check
|
||||
`bool`: result of the check
|
||||
|
||||
<a name="relations.relation_manager.RelationsManager.get"></a>
|
||||
#### get
|
||||
@ -39,11 +39,11 @@ Actual call is delegated to Relation instance registered under relation name.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `name (str)`: name of the relation
|
||||
- `name` (`str`): name of the relation
|
||||
|
||||
**Returns**:
|
||||
|
||||
`(Optional[Union[Model, List[Model]])`: related model or list of related models if set
|
||||
`Optional[Union[Model, List[Model]]`: related model or list of related models if set
|
||||
|
||||
<a name="relations.relation_manager.RelationsManager.add"></a>
|
||||
#### add
|
||||
@ -62,9 +62,9 @@ on both ends.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `parent (Model)`: parent model on which relation should be registered
|
||||
- `child (Model)`: child model to register
|
||||
- `field (ForeignKeyField)`: field with relation definition
|
||||
- `parent` (`Model`): parent model on which relation should be registered
|
||||
- `child` (`Model`): child model to register
|
||||
- `field` (`ForeignKeyField`): field with relation definition
|
||||
|
||||
<a name="relations.relation_manager.RelationsManager.remove"></a>
|
||||
#### remove
|
||||
@ -79,8 +79,8 @@ of relation from which you want to remove the child.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `name (str)`: name of the relation
|
||||
- `child (Union[Model, Type[Model]])`: child to remove from relation
|
||||
- `name` (`str`): name of the relation
|
||||
- `child` (`Union[Model, Type[Model]]`): child to remove from relation
|
||||
|
||||
<a name="relations.relation_manager.RelationsManager.remove_parent"></a>
|
||||
#### remove\_parent
|
||||
@ -96,9 +96,9 @@ of relation from which you want to remove the parent.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `item (Union[Model, Type[Model]])`: model with parent registered
|
||||
- `parent (Model)`: parent Model
|
||||
- `name (str)`: name of the relation
|
||||
- `item` (`Union[Model, Type[Model]]`): model with parent registered
|
||||
- `parent` (`Model`): parent Model
|
||||
- `name` (`str`): name of the relation
|
||||
|
||||
<a name="relations.relation_manager.RelationsManager._get"></a>
|
||||
#### \_get
|
||||
@ -111,11 +111,11 @@ Returns the actual relation and not the related model(s).
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `name (str)`: name of the relation
|
||||
- `name` (`str`): name of the relation
|
||||
|
||||
**Returns**:
|
||||
|
||||
`(ormar.relations.relation.Relation)`: Relation instance
|
||||
`ormar.relations.relation.Relation`: Relation instance
|
||||
|
||||
<a name="relations.relation_manager.RelationsManager._get_relation_type"></a>
|
||||
#### \_get\_relation\_type
|
||||
@ -128,11 +128,11 @@ Returns type of the relation declared on a field.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `field (BaseField)`: field with relation declaration
|
||||
- `field` (`BaseField`): field with relation declaration
|
||||
|
||||
**Returns**:
|
||||
|
||||
`(RelationType)`: type of the relation defined on field
|
||||
`RelationType`: type of the relation defined on field
|
||||
|
||||
<a name="relations.relation_manager.RelationsManager._add_relation"></a>
|
||||
#### \_add\_relation
|
||||
@ -146,5 +146,5 @@ Adds Relation instance under field.name.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `field (BaseField)`: field with relation declaration
|
||||
- `field` (`BaseField`): field with relation declaration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user