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

https://json-rql.org/interfaces/group.html

Hierarchy

  • Pattern
    • Group

Index

Properties

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 https://github.com/gsvarovsky/json-rql/search?l=JSON&q=context&type=Code

Optional @graph

@graph: Subject | Subject[]

Specifies a Subject or an array of Subjects.

When resolving query solutions,

Optional @union

@union: (Subject | Subject[])[]

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

Legend

  • Property
  • Method

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