Query language RAQL
RAQL is a combinator language and therefore the semantics of a RAQL query only depend on the semantics of the base combinators. As the name suggests, RAQL is based on standard relational algebra which is also the foundation for all relational database systems.
Each query describes a relation (would correspond to tables in a database). Relations are sequences of tuples (the rows of a table) where each tuple has the same form: It consists of a certain number of constituents (the columns of a table) in a certain order. Each constituent has a name (a string that is unique among the relation, the column name) and a type (column type: string, number, date etc). The combinators of RAQL describe set operations on relations and can be used to narrow or widen a search, join relations, or extract information out of tuples.
RAQL is strongly typed: Each value in the query language has a static type and the languageās type system automatically computes the types for all relations and tuples. If a query contains a typing error the query compiler will raise an error. The supported types are: Boolean, number, string, UUIDs, date, time, dateTime revision and document type definition.
Through combinators and expressions additional types can arise: set types and product types. Type conversion must be carried out explicitly using the corresponding operators.