DeleteBlob
Deletes Blob objects that satisfy the specified constraints, and all the connections to/from those blob objects.
Parameters
- [optional] ref: Reference to Blob objects within the transaction (result of a FindBlob).
- [optional] constraints
Details
If the ref parameter is used, constraints will be ignored.
For remote blobs, the metadata is deleted but the original blobs in the remote storage are not.
If the ref parameter is used, the search results represented by the ref will not be valid for the remaining commands within the transaction.
For more complex searches for objects to delete, a Find command must be used first within the transaction.
Warning: Delete is an performance expensive command, as ApertureDB was designed for read intensive workloads.
Examples
Delete Blobs with "unique_id" property equal to 22:
[{
"DeleteBlob": {
"constraints": {
"id": ["==", 22]
}
}
}]
Successful response:
[{
"DeleteBlob": {
"count": 1,
"status": 0
}
}]
Delete Blobs with "unique_id" property equal to 22 and connections to entities of class "Person" with the "age" property equal to 30:
[{
"FindEntity": {
"with_class": "Person",
"_ref": 1,
"constraints": {
"age": ["==", 30]
}
}
}, {
"FindBlob": {
"_ref": 2,
"constraints": {
"id": ["==", 22]
},
"blobs": false,
"is_connected_to": {
"ref": 1
}
}
}, {
"DeleteBlob": {
"ref": 2
}
}]
Successful response:
[{
"FindEntity": {
"returned": 0,
"status": 0
}
}, {
"FindBlob": {
"returned": 0,
"status": 0
}
}, {
"DeleteBlob": {
"count": 1,
"status": 0
}
}]