Options
All
  • Public
  • Public/Protected
  • All
Menu

Used to express a group of patterns to match, or a group of subjects to write (when used as a transaction pattern).

Examples:


Insert multiple subjects

{
  "@graph": [
    {
      "@id": "fred",
      "name": "Fred"
    },
    {
      "@id": "wilma",
      "name": "Wilma"
    }
  ]
}

Delete all properties of subject fred and all properties of other subjects that reference it

{
  "@delete": [
    { "@id": "fred", "?prop1": "?value" },
    { "@id": "?id2", "?ref": { "@id": "fred" } }
  ],
  "@where": {
    "@union": [
      { "@id": "fred", "?prop1": "?value" },
      { "@id": "?id2", "?ref": { "@id": "fred" } }
    ]
  }
}

Note that when used in a @where clause, a plain array can substitute for a Group, as follows:

Select combinations of subjects having a common property value

{
  "@select": ["id1", "id2"],
  "@where": {
    "@graph": [
      { "@id": "id1", "name": "?name" },
      { "@id": "id2", "name": "?name" }
    ]
  }
}

is equivalent to:

{
  "@select": ["id1", "id2"],
  "@where": [
    { "@id": "id1", "name": "?name" },
    { "@id": "id2", "name": "?name" }
  ]
}
see

json-rql group

Hierarchy

  • Pattern
    • Group

Index

Properties

Optional @context

@context: Context

A JSON-LD Context for the query. In an API, this will frequently be implicit. For example, using json-rql as the body of a POST to http://example.com/my-api/v1/person/query might have the implicit context of a Person (possibly found at http://example.com/my-api/v1/person).

see

examples

Optional @filter

@filter: Constraint | Constraint[]

Specifies a filter or an array of filters, each of the form { <operator> : [<expression>...] }.

Optional @graph

@graph: Subject | Subject[]

Specifies a Subject or an array of Subjects.

When resolving query solutions,

Optional @union

@union: (Subject | Group)[]

Specifies a set of alternative Subjects (or sets of Subjects) to match.

Optional @values

Specifies a Variable Expression or array of Variable Expressions that define [inline allowable value combinations]

Legend

  • Constructor
  • Property
  • Method
  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Protected method
  • Static method

Generated using TypeDoc. Delivered by Vercel. @m-ld/m-ld - v0.8.2 Source code licensed MIT. Privacy policy