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​

At least one of ref, with_name, or constraints is required. with_name is ignored when ref is present; constraints still filter that reference.

Parameter

JSON type

Behavior

background

boolean

Optional. false: deletes the selected sets and their descriptors during the transaction. true marks selected sets deleted and requests asynchronous descriptor-manager refresh/cleanup. Descriptors may remain accessible while cleanup runs; success does not mean cleanup has completed.

constraints

array expression

Optional. No property filter; the command-specific selector requirement still applies. Filters existing objects using the constraints expression language. When ref is supplied it filters that referenced set.

ref

integer, 1 through 100000

Optional. Select using the other supplied selectors; see the selection rule above. Uses an earlier compatible DescriptorSet reference in this transaction; forward references, wrong types, and undeclared references are rejected.

with_name

string

Optional. No set-name restriction; ref or constraints must be supplied. Filters by exact descriptor-set name. Ignored when ref is present; constraints still restrict ref.

Details​

If the ref parameter is used, with_name will be ignored, but constraints will act as additional filters on the referenced result set.

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.

Deleting objects selected by ref invalidates that reference for the remaining commands in the transaction.

A preceding Find command can select objects using more complex criteria and pass its result to the delete command through ref.

Deletion is computationally expensive; ApertureDB is optimized for workloads that perform more reads than deletes.

Response and errors​

An authenticated session with the objects delete permission is required.

The response is an object under DeleteDescriptorSet with integer status and, on success, integer count. Status 0 means the mutation completed; count is the number of selected objects affected, including zero when none match. No output blobs are returned. With background true, count reports sets marked for deletion, not completed descriptor cleanup. Count covers the parent objects, excluding deleted children.

Invalid field types, missing required fields, malformed expressions, and invalid references fail validation. Execution failures include a nonzero status and an info message; inspect the transaction response before assuming a mutation succeeded. Set deletion also removes the descriptors connected to the set. Deleting nodes also removes incident connections.

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
}
}]