UpdateConnection
Updates existing Connection objects that satisfy the specified constraints.
Parameters
- [optional] ref: Reference to other connections within the transaction.
- [optional] with_class: name of entity class.
- [optional] constraints
- [optional] properties
- [optional] remove_props
Details
If the ref parameter is used, with_class and constraints will be ignored.
If the ref parameter is specified, it must refers to the search results of a FindConnection within the transaction.
Examples
Find the connection of class "FriendWith" with a particular "since" property, and remove the "last_connected" property:
[{
"UpdateConnection": {
"with_class": "FriendWith",
"constraints": {
"since": ["==", 1998]
},
"remove_props": ["last_seen_together"]
}
}]
Find the connection of class "HasBeen" with a particular "year" property, and change/add two new properties:
[{
"UpdateConnection": {
"with_class": "HasBeen",
"constraints": {
"year": ["==", 2002]
},
"properties": {
"year": 2001,
"month": "June"
}
}
}]