Skip to main content

DeleteClip

Deletes Clip objects that satisfy the specified constraints and all the connections to or from those clip objects.

Parameters

  • [optional] ref: Reference to Clip objects within the transaction (result of a FindClip).
  • [optional] constraints

Details

If the ref parameter is used, then constraints will be ignored.

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 all Clip objects with "name" property equal to "Isolated Island"; this will effect all clips attached to all videos in the database.


[{
"DeleteClip": {
"constraints": {
"name": ["==", "Isolated Island"]
}
}
}]

Successful response where 1 clip is deleted:


[{
"DeleteClip": {
"count": 1,
"status": 0
}
}]

Delete Clip objects with "name" property equal to "Room 237" that have connections to a Video with the "name" property equal to "The Shining":


[{
"FindVideo": {
"_ref": 1,
"constraints": {
"name": ["==", "The Shining"]
}
}
}, {
"FindClip": {
"video_ref": 1,
"_ref": 2,
"constraints": {
"name": ["==", "Room 237"]
}
}
}, {
"DeleteClip": {
"ref": 2
}
}]

Successful response where 1 clip is deleted:


[{
"FindVideo": {
"returned": 0,
"status": 0
}
}, {
"FindClip": {
"returned": 0,
"status": 0
}
}, {
"DeleteClip": {
"count": 1,
"status": 0
}
}]