MathQL-1

A query language for RDF metadata

  • What's new

What's new

This page reports the newly implemented features of MathQL-1 that are not included in the ufficial documentation yet.

Changes and additions to MathQL-1 operators:
  • The add operator now accepts a syntax extension allowing to specify more than one explicit attribute group.
The syntax now is:
<query> := "add" [ "distr" ]? [ <groups> | <avar> ] "in" <query>
<groups> := <group> [ ";" <group> ]*
<group> := <attribute> [ "," <attribute> ]*
<attribute> := <value> "as" <path>

Examples:
the query add "1" as "a", "2" as "b" in subj "A" gives the result "A" attr {"a"="1"; "b"="2"} while
the query add "1" as "a"; "2" as "b" in subj "A" gives the result "A" attr {"a"="1"}, {"b"="2"}.
  • The new align operator takes an integer i (represented as a string), a multiple string value v and returns the same v where each string with length n < i is prefixed with i - n spaces. The syntax of the add operator is:
<value> := "align" <string> "in" <value>

This operators aligns strings containing numbers so that their alphabetic order agrees with their numeric order.
  • The intersect operator now intersects the attribute groups of the mathing subject strings set-theoretically rather than making their "Cartesian product". This semantics reduces the computational costs and makes intersection the dual of union.
  • The property operator now accepts more than one isfalse clause to increase the complexity of the constraint condition used to filter the query results. This feature is exploited in the queries produced by the HELM query generator.