Skip to main content

DeleteDescriptorSet

Deletes descriptor set objects that satisfy the specified constraints, all the descriptors in the sets, and all the connections to/from those descriptors and sets objects.

Parameters

  • [optional] with_name: Name of the set.
  • [optional] ref: Reference to descriptor set objects within the transaction (result of a FindDescriptorSet).
  • [optional] constraints
  • [optional] background: Differs deletion of the set and associated descriptions as a background task (Default: false).

Details

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

If background is set to true, a response is returned immediately. During the deletion process, which happens in background, certain _Descriptor objects may be still accessible by queries.

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 the descriptor set named "pretty_faces":


[{
"DeleteDescriptorSet": {
"with_name": "pretty_faces"
}
}]

Successul response:


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

Delete descriptor set with "year" property less that 2005 and connections to entities of class "Person" with the "age" property equal to 30:


[{
"FindEntity": {
"with_class": "Person",
"_ref": 1,
"constraints": {
"age": ["==", 30]
}
}
}, {
"FindDescriptorSet": {
"_ref": 2,
"constraints": {
"year": ["==", 2005]
},
"is_connected_to": {
"ref": 1
}
}
}, {
"DeleteDescriptorSet": {
"ref": 2
}
}]

Successful response:


[{
"FindEntity": {
"returned": 0,
"status": 0
}
}, {
"FindDescriptorSet": {
"returned": 0,
"status": 0
}
}, {
"DeleteDescriptorSet": {
"count": 1,
"status": 0
}
}]