AttachRelation
Create relationships between records in RushDB by specifying source, target IDs, relation type, and direction to establish connections in your graph database.
Instructions
Create a relationship between records (single or multiple targets)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| direction | No | Direction of the relationship | outgoing |
| relationType | No | Type of the relationship | |
| sourceId | Yes | ID of the source record | |
| targetId | No | ID of one target record (deprecated if targetIds provided) | |
| targetIds | No | IDs of multiple target records | |
| transactionId | No | Optional transaction ID for atomic relation creation |
Input Schema (JSON Schema)
{
"properties": {
"direction": {
"default": "outgoing",
"description": "Direction of the relationship",
"enum": [
"outgoing",
"incoming",
"bidirectional"
],
"type": "string"
},
"relationType": {
"description": "Type of the relationship",
"type": "string"
},
"sourceId": {
"description": "ID of the source record",
"type": "string"
},
"targetId": {
"description": "ID of one target record (deprecated if targetIds provided)",
"type": "string"
},
"targetIds": {
"description": "IDs of multiple target records",
"items": {
"type": "string"
},
"type": "array"
},
"transactionId": {
"description": "Optional transaction ID for atomic relation creation",
"type": "string"
}
},
"required": [
"sourceId"
],
"type": "object"
}