OpO FAST Triple Store, Web Server, and JSON Database
TQL
OpO

A delete operation is defined by a DELETE clause with no options.

The LIMIT clause limits the number of returned items to the values specified.

A delete can replace a root node or branches. If the WHERE clause matches a branch that branch is deleted along with all attached branches.

Friendly Example

WHERE EQ(name 'Pete') FILTER NOT(GT(age 21) DELETE LIMIT 3

JSON Example

{ "where": [ "EQ", "name", "'Pete" ], "filter": [ "NOT", [ "GT", 21 ]], "delete": 1 }

The return from a DELETE is a JSON Object. The contents of the result Object will be different depending on the success or failure of the evaluation. In all cases a code member will be present. A code value of zero indicates success. Any other value indicates an error.

On success the JSON object result will include a deleted member that is an array of the references to all te deleted records.

If an RID was specified in the query then a rid member will also be included in the result Object.

If an error occurs during statement processing or the statement is not valid the JSON object result will include a error member describing the error.

Success

{ "code": 0, "deleted": [ 15371, 19979 ] }

Failure

{ "code": 166, "error": "Not found." }