Skip to main content

DeleteFrame

Deletes Frame objects that satisfy the specified constraints, and all the connections to/from those frame objects.

Parameters

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

Details

If the ref parameter is used, 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 Frame objects with "my_id" property equal to 22:


[{
"DeleteFrame": {
"constraints": {
"my_id": ["==", 22]
}
}
}]

Successful response:


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

Delete Frame objects with "source" property equal to "my_model", and with frame number greater than 10, and that have connections to a Video with the "year_captured" property equal to 1990:


[{
"FindVideo": {
"_ref": 1,
"constraints": {
"year_captured": ["==", 1990]
}
}
}, {
"FindFrame": {
"_ref": 2,
"in_frame_number_range": {
"start": 10
},
"constraints": {
"source": ["==", "my_model"]
},
"is_connected_to": {
"ref": 1
}
}
}, {
"DeleteFrame": {
"ref": 2
}
}]

Successful response:


[{
"FindVideo": {
"returned": 0,
"status": 0
}
}, {
"FindFrame": {
"returned": 0,
"status": 0
}
}, {
"DeleteFrame": {
"count": 1,
"status": 0
}
}]