OpO FAST Triple Store, Web Server, and JSON Database

A TQL query is composed of one or more clauses. Each clause has a verb that identifies the type of clause. In addition most clauses has a value. Values vary depending on the clause and my be a single integer as in the case of a LIMIT or they could be a JSON document in the case of an INSERT.

# friendly TQL SELECT { "id": $REF, "top": $ } WHERE EQ(firstname 'Pete') FILTER NOT(GTE(age 21))

An INSERT or UPDATE inserts or updates a JSON document so the value for the is the content to insert or update.

insert { "name": "Pete", "age": 63 }

A SELECT clause describes the content and format of the expected returned JSON. The value should be an almost valid JSON. The exceptions being paths and keywords which are strings without quotes.

If no other operation verb such as INSERT, UPDATE, or DELETE is provided a SELECT of the complete JSON is assumed.

In the select value or return template all tokens (strings without quotes) that are not JSON reserved are assumed to be either paths or special keys if they begin with a $.

SELECT { "primaryName": name, "realAge": age, "id": $ref, "source": "sample" }

A DELETE deletes JSON documents from the database. It takes no arguments.

WHERE EQ(name 'Pete') DELETE

WHERE and FILTER values are encoded using a function call like approach but like GraphQL the commas are optional. Single quotes or double quotes can be used to deliminate strings which a path to an element is not quoted.

WHERE OR( EQ(name 'Pete') EQ(name 'Makie'))

A LIMIT clause expects an integer value which limits the number of JSON records impacted by the TQL query.


A CURSOR clause expects an object with a single key that is the name of a previous SELECT indicating a new query should be made and stored.

CURSOR some-stored-id 7