UNQL

UNQL

UNQL is the Uninode® Query Language, for querying data sources using Uninode® and Edgescript®. Read More About Uninode® Suite

Structure

UNQL is a JSON/Edgescript® structure for server queries.

A query JSON structure looks like this;

{
  • "edgeSpaces": [{ (optional, array is used for enforcing join order)
    • "<Edgespace code>": {
      • "className": "<Class name>"
      • "filter": "<Edgescript® filter>" (optional)
      }, ...
    }, ...]
  • "titlePath": <Edgepath> (optional)
  • "paths": [<Edgepath, e.g. "\Asset.name" or "\.name">, ...]
  • "orderPaths": [<Edgepath>, ...] (optional)
  • "filters": ["<Edgescript® filter>", ...] (optional)
  • "isDistinct": <true or false> (optional, default false)
  • "limit": <number> (optional, default 100)
  • "maxClassCount": <number> (optional, default 1)
  • "tree": { (optional, used for intra-level tree hierarchy)
    • "path": <Edgepath> (optional, used if parent and child are stored in another table)
    • "parent": <Edgepath>
    • "child": <Edgepath>
    }
  • "layers": [{ (optional, used for data layers)
    • "path": <Edgepath> (optional, path to layer id)
    • "parent": <Edgepath> (optional, path to layer parent id)
    }, ...]
  • "levels": [{ (optional, used for tree level queries)
    • "isHidden": <true or false> (optional, records for this level are marked with "isHidden": true)
    • "paths": [ (optional, used for connecting this level to next)
      • "parent": <Edgepath>
      • "child": <Edgepath>
      , ...]
    • "query": [<query>, ...] (optional, query for next level)
    }, ...]
}

A request JSON structure looks like this:

{
  • "lang": "<Language code>"
  • "siteCode": "<Site code>"
  • "packCode": "<Package code>"
  • "orgCode": "<Organization code>"
  • "appCode": "<App code>"
  • "query": <query>
}

Edgescript®

Edgescript®

UNQL uses the Edgescript® programming language for various dynamic behavior. Read More About Edgescript®

Edgespace

An edgepath is a reference to a property of some object. It normally requires a class name and a property name, e.g. \Asset.name.

A named edgespace can be used in an edgepath instead of the class name, e.g. \a.name, if a is the name of an edgespace. The default edgespace has no name, and the corresponding edgepath would look like \.name;

Note that two edgespaces in a query may have the same class. For instance, the default edgespace may have the class Asset, and the 'compare' edgespace may have the class Asset and the filter "\.id==\compare.id&\.date=='2022-10-01'". This would result in a database left join where the second Asset table would be a comparison to the same asset at the date '2022-10-01'.

Nodelab

UNQL is used in the Nodelab product, for defining data models, processes and user interfaces. Read More