UpdateBlob
Updates existing blob objects that satisfy the specified constraints.
Parameters
[optional] ref: Reference to other entities within the transaction.
[optional] constraints
[optional] properties
[optional] remove_props
Details
If the ref parameter is used, constraints will be ignored.
If the ref parameter is specified, it must refer to the search result of a previous FindBlob.
For more complex searches for object to delete, a Find command must be used first within the transaction.
Examples
Find the blobs with the “year_captured” property equal to 2007, and remove the “audio_codec” property:
[ {
"UpdateBlob": {
"constraints": {
"year_captured": [ "==", 2007 ],
},
"remove_props": [ "audio_codec" ]
}
}]
Find the blobs that are connected to an object of the class “Dataset”, and update the “year” property:
[ {
"FindEntity": {
"_ref": 1,
"with_class": "Dataset",
"unique": true,
"constraints": {
"name": ["==", "Audio Dataset"]
}
}
}, {
"FindBlob": {
"_ref": 2,
"is_connected_to": {
"ref": 1,
"connection_class": "in_dataset"
},
"blobs": false
}
}, {
"UpdateBlob": {
"ref": 2,
"properties": {
"year": 2005,
}
}
}]