DeleteImage

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

Parameters

  • [optional] ref: Reference to Image objects within the transaction (result of a FindImage).
  • [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 image with “unique_id” property equal to 22:

[ {
    "DeleteImage": {
        "constraints": {
            "unique_id": ["==", 22]
        }
    }
}]

Delete image with “unique_id” property equal to 22 and connections to entities of class “Person” with the “age” property equal to 30:

[ {
    "FindEntity": {
        "_ref": 1,
        "with_class": "Person",
        "constraints": {
            "age": ["==", 30]
        }
    }
}, {
    "FindImage" : {
        "_ref": 2,
        "blobs": false,
        "constraints": {
            "unique_id": ["==", 22]
        },
        "is_connected_to": {
            "ref": 1,
        }
    }
}, {
    "DeleteImage": {
        "ref": 2,
    }
}]