defineRelation()
Call Signature
function defineRelation<O, D>(
tag,
origin?,
destination?,
direction?): Relation<O, D>;
Create a constant relation object between two specified DataTypes.
That constant is used especially to create queries see Query.follow(relation)
Type Parameters
Type Parameter |
---|
O extends CloudObject |
D extends CloudObject |
Parameters
Parameter | Type | Description |
---|---|---|
tag | InstanceOrTag | tag of the relation |
origin? | Class <O > | origin DataType of the relation |
destination? | Class <D > | destination DataType of the relation. Default is CloudObject |
direction? | Direction | direction of the relation, pointing towards origin or destination. Default is DESTINATION |
Returns
Relation
<O
, D
>
newly defined relation
Call Signature
function defineRelation(tag, direction?): Relation<CloudObject, CloudObject>;
Create a constant relation object between two generic CloudObjects
That constant is used especially to create queries see Query.follow(relation)
Parameters
Parameter | Type | Description |
---|---|---|
tag | InstanceOrTag | tag of the relation |
direction? | Direction | direction of the relation, pointing towards origin or destination. Default is DESTINATION |
Returns
Relation
<CloudObject
, CloudObject
>
newly defined relation