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

Details

If the ref parameter is used, with_name and 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 the descriptor set named “pretty_faces”:

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

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]
        }
    }
}, {
    "FindDescriptor" : {
        "_ref": 2,
        "constraints": {
            "year": ["==", 2005]
        },
        "blobs": false,
        "is_connected_to": {
            "ref": 1,
        }
    }
}, {
    "DeleteDescriptorSet": {
        "ref": 2,
    }
}]