The Perfion Query – DELETE

  • Updated

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:

{
   "Query": {
      "Delete": { },
      "From": { "id": "Product" },
   }
}

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

 

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.