The Perfion Query – DELETE

The Delete-statement is used to delete items from Perfion. An example is shown here:

XML:

<Query>    <Delete/>    <From id ='Product'/>    <Where>       <Clause id='Material' operator='=' value='Stainless Steel' />    </Where> </Query>

JSON:

{    "Query": {       "Delete": { },       "From": { "id": "Product" },       "Where": {          "Clauses": [              { "Clause": { "id": "Material", "operator": "=", "value": "Stainless Steel" } }          ]       }    } }

The above query will delete all items of base feature ‘Product’, where the ‘Material’ equals ‘Stainless Steel’. More elaborate clauses can be created. There will be more on where-clauses later.

Be careful when doing deletes. The below query will delete all products (that is, items of base feature product):

XML:

<Query>    <Delete/>    <From id ='Product'/> </Query>

JSON:

NOTE: The delete statement supports the timezone-attribute/property the exact same way the update-statement does.