OpO FAST Triple Store, Web Server, and JSON Database

A delete operation is defined by a DELETE clause. The value of the DELETE is optional. If a value is provided it is the maximum number of root nodes to be deleted. WHERE and FILTER clauses are used to indicate which nodes should be deleted.

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

Statements are evaluated asynchronously allowing multiple outstanding queries to be active. To support this an RID clause is allowed in the DELETE statement. The value for the RID clause must be a string. The RID value is passed back in the query result.

Friendly Example

RID "request-3" WHERE EQ(name, "Pete") FILTER NOT(GT(age, 21) DELETE 1

JSON Example

{ "rid": "request-3", "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.


{ "rid": "request-3", "code": 0, "deleted": [ 15371, 19979 ] }


{ "rid": "request-3", "code": 166, "error": "Not found." }