Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue saving WOQL-schema-bound documents with ValueHash #2122

Open
hoijnet opened this issue May 5, 2024 · 0 comments
Open

Issue saving WOQL-schema-bound documents with ValueHash #2122

hoijnet opened this issue May 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@hoijnet
Copy link

hoijnet commented May 5, 2024

Describe the bug
When including a query in a document created using the woql schema (extended, see further down), it can't find referenced documents, even if no value is present...

It seems the tagged unions are not working properly.

Following changes:

  • Added LogicalNamedQuery
  • Changed left and right of Equal to Value, instead of DataValue

Example query document to be saved:

{"@id":"LogicalNamedQuery/aB7eHntgg4MSDSZo","@type":"LogicalNamedQuery","markdownDescription":"","name":"New logic2","woqlString":"select(\n  \"v:subject\",\n  \"v:type\",\n  and(\n    triple(\"v:subject\", \"rdf:type\", \"v:type\"),\n    not(quad(\"v:type\", \"sys:subdocument\", \"v:select\", \"schema\")),\n    not(eq(\"v:type\", \"rdf:List\")),\n  ),\n)","query":{"@type":"Select","variables":["subject","type"],"query":{"@type":"And","and":[{"@type":"Triple","subject":{"@type":"NodeValue","variable":"subject"},"predicate":{"@type":"NodeValue","node":"rdf:type"},"object":{"@type":"Value","variable":"type"}},{"@type":"Not","query":{"@type":"Triple","subject":{"@type":"NodeValue","variable":"type"},"predicate":{"@type":"NodeValue","node":"sys:subdocument"},"object":{"@type":"Value","variable":"select"},"graph":"schema"}},{"@type":"Not","query":{"@type":"Equals","left":{"@type":"Value","variable":"type"},"right":{"@type":"Value","node":"rdf:List"}}}]}}}

To Reproduce
Steps to reproduce the behavior:

  1. Setup schema (woql.json, with modifications)
  2. Add document above
  3. See error

Expected behavior
It should be saved properly

Screenshots

{
    "@type": "api:ReplaceDocumentErrorResponse",
    "api:error": {
        "@type": "api:DocumentNotFound",
        "api:document": {
            "@id": "LogicalNamedQuery/aB7eHntgg4MSDSZo",
            "@type": "LogicalNamedQuery",
            "markdownDescription": "",
            "name": "New logic2",
            "query": {
                "@type": "Select",
                "query": {
                    "@type": "And",
                    "and": [
                        {
                            "@type": "Triple",
                            "object": {
                                "@type": "Value",
                                "variable": "type"
                            },
                            "predicate": {
                                "@type": "NodeValue",
                                "node": "rdf:type"
                            },
                            "subject": {
                                "@type": "NodeValue",
                                "variable": "subject"
                            }
                        },
                        {
                            "@type": "Not",
                            "query": {
                                "@type": "Triple",
                                "graph": "schema",
                                "object": {
                                    "@type": "Value",
                                    "variable": "select"
                                },
                                "predicate": {
                                    "@type": "NodeValue",
                                    "node": "sys:subdocument"
                                },
                                "subject": {
                                    "@type": "NodeValue",
                                    "variable": "type"
                                }
                            }
                        },
                        {
                            "@type": "Not",
                            "query": {
                                "@type": "Equals",
                                "left": {
                                    "@type": "Value",
                                    "variable": "type"
                                },
                                "right": {
                                    "@type": "Value",
                                    "node": "rdf:List"
                                }
                            }
                        }
                    ]
                },
                "variables": [
                    "subject",
                    "type"
                ]
            },
            "woqlString": "select(\n  \"v:subject\",\n  \"v:type\",\n  and(\n    triple(\"v:subject\", \"rdf:type\", \"v:type\"),\n    not(quad(\"v:type\", \"sys:subdocument\", \"v:select\", \"schema\")),\n    not(eq(\"v:type\", \"rdf:List\")),\n  ),\n)"
        },
        "api:document_id": "terminusdb://woql/data/Value/-iVIieOHIB8BBwKw"
    },
    "api:message": "Document not found: 'terminusdb://woql/data/Value/-iVIieOHIB8BBwKw'",
    "api:status": "api:not_found"
}

Info (please complete the following information):

  • OS: DFRNT

Additional context

This is the schema used:

[
  {
    "@base": "terminusdb://woql/data/",
    "@documentation": {
      "@authors": [
        "Gavin Mendel-Gleason"
      ],
      "@description": "This is the WOQL schema. It gives a complete specification of the syntax of the WOQL query language. This allows WOQL queries to be checked for syntactic correctness, helps to prevent errors and detect conflicts in merge of queries, and allows the storage and retrieval of queries so that queries can be associated with data products.",
      "@title": "WOQL schema"
    },
    "@metadata": {
      "DFRNT": {
        "defaultLabelProperty": "name",
        "version": "1.0"
      }
    },
    "@schema": "http://terminusdb.com/schema/woql#",
    "@type": "@context",
    "xsd": "http://www.w3.org/2001/XMLSchema#"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Or",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "or": "List of queries which may hold."
        },
        "@comment": "A disjunction of queries any of which can provide a solution."
      }
    ],
    "or": {
      "@class": "Query",
      "@type": "List"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Once",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "query": "The query from which to obtain a solution."
        },
        "@comment": "Obtains exactly one solution from a query. Simliar to a limit of 1."
      }
    ],
    "query": "Query"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "Lexical",
      "@fields": [
        "name"
      ]
    },
    "@id": "NamedQuery",
    "@documentation": [
      {
        "@properties": {
          "name": "The name of the NamedQuery to be retrieved",
          "query": "The query AST as WOQL JSON"
        },
        "@comment": "A named query names a specific query for later retrieval and re-use."
      }
    ],
    "query": "Query",
    "name": "xsd:string"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Minus",
    "@inherits": [
      "ArithmeticExpression"
    ],
    "@documentation": [
      {
        "@properties": {
          "left": "First operand of minus.",
          "right": "Second operand of minus."
        },
        "@comment": "Subtract two numbers."
      }
    ],
    "right": "ArithmeticExpression",
    "left": "ArithmeticExpression"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Lower",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "lower": "The lower case string.",
          "mixed": "The mixed case string."
        },
        "@comment": "Lowercase a string."
      }
    ],
    "mixed": "DataValue",
    "lower": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Limit",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "limit": "Maximum number of solutions.",
          "query": "The query to perform."
        },
        "@comment": "Limit a query to a particular maximum number of solutions specified by 'limit'. Can be used with start to perform paging."
      }
    ],
    "query": "Query",
    "limit": "xsd:nonNegativeInteger"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "LexicalKey",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "base": "The URI base to the left of the key.",
          "key_list": "List of data elements required to generate the key.",
          "uri": "The resulting URI."
        },
        "@comment": "Generates a key identical to those generated automatically by 'LexicalKey' specifications."
      }
    ],
    "uri": "NodeValue",
    "key_list": {
      "@class": "DataValue",
      "@type": "List"
    },
    "base": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Length",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "length": "The length of the list.",
          "list": "The list of which to find the length."
        },
        "@comment": "The length of a list."
      }
    ],
    "list": "DataValue",
    "length": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "Random"
    },
    "@id": "Query",
    "@abstract": [],
    "@subdocument": [],
    "@documentation": [
      {
        "@comment": "An abstract class which represents an arbitrary query AST."
      }
    ]
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "PathTimes",
    "@inherits": [
      "PathPattern"
    ],
    "@documentation": [
      {
        "@properties": {
          "from": "The number of times to start the repetition of the pattern",
          "times": "A path pattern.",
          "to": "The number of times after which to end the repeition of the pattern."
        },
        "@comment": "The path pattern specified by 'times' may hold 'from' to 'to' times in succession."
      }
    ],
    "to": "xsd:nonNegativeInteger",
    "times": "PathPattern",
    "from": "xsd:nonNegativeInteger"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "PathSequence",
    "@inherits": [
      "PathPattern"
    ],
    "@documentation": [
      {
        "@properties": {
          "sequence": "A sequence of path patterns."
        },
        "@comment": "A sequence of patterns in which each of the patterns in the list must result in objects which are subjects of the next pattern in the list."
      }
    ],
    "sequence": {
      "@class": "PathPattern",
      "@type": "List"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "Random"
    },
    "@id": "PathPattern",
    "@abstract": []
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Path",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "object": "The ending node.",
          "path": "An optional list of edges traversed.",
          "pattern": "The pattern which describes how to traverse edges.",
          "subject": "The starting node."
        },
        "@comment": "Find a path through the graph according to 'pattern'. This 'pattern' is a regular graph expression which avoids cycles."
      }
    ],
    "subject": "Value",
    "pattern": "PathPattern",
    "path": {
      "@class": "Value",
      "@type": "Optional"
    },
    "object": "Value"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "OrderTemplate",
    "@subdocument": [],
    "@documentation": [
      {
        "@properties": {
          "order": "An enum either 'asc' or 'desc'.",
          "variable": "The variable to order."
        },
        "@comment": "The order template, consisting of the variable and ordering direction."
      }
    ],
    "variable": "xsd:string",
    "order": "Order"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Triple",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A URI, datatype or variable which is the target or object of the graph edge.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge.",
          "subject": "A URI or variable which is the source or subject of the graph edge."
        },
        "@comment": "Specify an edge pattern in the graph."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "Value",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Times",
    "@inherits": [
      "ArithmeticExpression"
    ],
    "@documentation": [
      {
        "@properties": {
          "left": "First operand of times.",
          "right": "Second operand of times."
        },
        "@comment": "Multiply two numbers."
      }
    ],
    "right": "ArithmeticExpression",
    "left": "ArithmeticExpression"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Subsumption",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "child": "The child class as a URI or variable.",
          "parent": "The parent class as a URI or variable"
        },
        "@comment": "Provides class subsumption (the inheritance model) according to the schema design. True whenver 'child' is a child of 'parent'. Can be used as a generator or a check."
      }
    ],
    "parent": "NodeValue",
    "child": "NodeValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Start",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "query": "The query to perform.",
          "start": "The numbered solution to start at."
        },
        "@comment": "Start a query at the nth solution specified by 'start'. Allows resumption and paging of queries."
      }
    ],
    "start": "xsd:nonNegativeInteger",
    "query": "Query"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Size",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "resource": "The resource to obtain the size of.",
          "size": "The size."
        },
        "@comment": "Size of a database in magic units (bytes?)."
      }
    ],
    "size": "DataValue",
    "resource": "xsd:string"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Regexp",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "pattern": "The PCRE style pattern.",
          "result": "An optional result list of matches.",
          "string": "The string to test."
        },
        "@comment": "Test a string against a PCRE style regex pattern."
      }
    ],
    "string": "DataValue",
    "result": {
      "@class": "DataValue",
      "@type": "Optional"
    },
    "pattern": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "ReadDocument",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "document": "Variable which will be bound to the document.",
          "identifier": "The URI of the document to load."
        },
        "@comment": "Read a full document from an identifier."
      }
    ],
    "identifier": "NodeValue",
    "document": "Value"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Using",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "collection": "The resource over which to run the query.",
          "query": "The query which will be run on the selected collection."
        },
        "@comment": "Select a specific collection for query."
      }
    ],
    "query": "Query",
    "collection": "xsd:string"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Upper",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "mixed": "The mixed case string.",
          "upper": "The upper case string."
        },
        "@comment": "Uppercase a string."
      }
    ],
    "upper": "DataValue",
    "mixed": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Typecast",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "result": "The resulting value after cast.",
          "type": "The type to which to cast.",
          "value": "The value to cast."
        },
        "@comment": "Casts one type as another if possible."
      }
    ],
    "value": "Value",
    "type": "NodeValue",
    "result": "Value"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "TypeOf",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "type": "The URI which that specifies the type.",
          "value": "The value of which to obtain the type."
        },
        "@comment": "TypeOf gives the type of an element."
      }
    ],
    "value": "Value",
    "type": "NodeValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "True",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@comment": "The query which is always true."
      }
    ]
  },
  {
    "@type": "TaggedUnion",
    "@id": "NodeValue",
    "@documentation": [
      {
        "@properties": {
          "node": "A URI representing a resource.",
          "variable": "A variable."
        },
        "@comment": "A variable or node."
      }
    ],
    "variable": "xsd:string",
    "node": "xsd:string"
  },
  {
    "@type": "TaggedUnion",
    "@id": "QueryResource",
    "source": "Source",
    "options": {
      "@class": "xdd:json",
      "@type": "Optional"
    },
    "format": "FormatType"
  },
  {
    "@type": "TaggedUnion",
    "@id": "Value",
    "@documentation": [
      {
        "@properties": {
          "data": "An xsd data type value.",
          "list": "A list of datavalues",
          "node": "A URI representing a resource.",
          "variable": "A variable."
        },
        "@comment": "A variable, node or data point."
      }
    ],
    "variable": "xsd:string",
    "node": "xsd:string",
    "list": {
      "@class": "Value",
      "@type": "List"
    },
    "dictionary": "DictionaryTemplate",
    "data": "sys:JSON"
  },
  {
    "@type": "Enum",
    "@id": "Order",
    "@value": [
      "asc",
      "desc"
    ]
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Column",
    "@subdocument": [],
    "variable": "xsd:string",
    "type": {
      "@class": "xsd:string",
      "@type": "Optional"
    },
    "indicator": "Indicator"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "AddedData",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A datatype or variable which is the target or object of the graph edge.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge.",
          "subject": "A URI or variable which is the source or subject of the graph edge."
        },
        "@comment": "Specify an edge pattern with data value which was added in *this* commit*."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "DataValue",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "AddedTriple",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A URI, datatype or variable which is the target or object of the graph edge.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge.",
          "subject": "A URI or variable which is the source or subject of the graph edge."
        },
        "@comment": "Specify an edge pattern which was *added* at *this commit*."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "Value",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "AddLink",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A URI or variable which is the target or object of the graph edge.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge.",
          "subject": "A URI or variable which is the source or subject of the graph edge."
        },
        "@comment": "Add an edge which links between nodes in the graph."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "NodeValue",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Divide",
    "@inherits": [
      "ArithmeticExpression"
    ],
    "@documentation": [
      {
        "@properties": {
          "left": "First operand of divide.",
          "right": "Second operand of divide."
        },
        "@comment": "Divide two numbers."
      }
    ],
    "right": "ArithmeticExpression",
    "left": "ArithmeticExpression"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Equals",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "left": "A URI, data value or variable.",
          "right": "A URI, data value or variable."
        },
        "@comment": "True whenever 'left' is the same as 'right'. Performs unification."
      }
    ],
    "right": "Value",
    "left": "Value"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "DictionaryTemplate",
    "@subdocument": [],
    "@documentation": [
      {
        "@properties": {
          "data": "Pairs of Key-Values to be constructed into a dictionary"
        },
        "@comment": "A representation of a JSON style dictionary, but with free variables. It is similar to an interpolated string in that it is a template with quoted data and substituted values."
      }
    ],
    "data": {
      "@class": "FieldValuePair",
      "@type": "Set"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "Random"
    },
    "@id": "Distinct",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "query": "The query which will be run prior to selection.",
          "variables": "The variables which must be distinct from the query."
        },
        "@comment": "Ensure variables listed result in distinct solutions."
      }
    ],
    "variables": {
      "@class": "xsd:string",
      "@type": "List"
    },
    "query": "Query"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "DeleteLink",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A URI or variable which is the target or object of the graph edge. The variable must be bound.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge. The variable must be bound.",
          "subject": "A URI or variable which is the source or subject of the graph edge. The variable must be bound."
        },
        "@comment": "Delete an edge linking nodes."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "NodeValue",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "DeletedLink",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A URI or variable which is the target or object of the graph edge.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge.",
          "subject": "A URI or variable which is the source or subject of the graph edge."
        },
        "@comment": "An edge pattern specifying a link beween nodes deleted *at this commit*."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "NodeValue",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Count",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "count": "The count of the number of solutions.",
          "query": "The query from which to obtain the count."
        },
        "@comment": "Counts the number of solutions of a query."
      }
    ],
    "query": "Query",
    "count": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Into",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "The graph filter: schema or instance.",
          "query": "The subquery with a new default write graph."
        },
        "@comment": "Change the default write graph (between instance/schema)."
      }
    ],
    "query": "Query",
    "graph": "xsd:string"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "IsA",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "element": "The element to test.",
          "type": "The type of the element."
        },
        "@comment": "Test (or generate) the type of an element."
      }
    ],
    "type": "NodeValue",
    "element": "NodeValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "If",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "else": "A query which runs whenever test fails.",
          "test": "A query which will provide bindings for the then clause.",
          "then": "A query which will run for every solution of test with associated bindings."
        },
        "@comment": "A conditional which runs the then clause for every success from the test clause, otherwise runs the else clause."
      }
    ],
    "then": "Query",
    "test": "Query",
    "else": "Query"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Get",
    "@inherits": [
      "Query"
    ],
    "resource": "QueryResource",
    "has_header": {
      "@class": "xsd:boolean",
      "@type": "Optional"
    },
    "columns": {
      "@class": "Column",
      "@type": "List"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "GroupBy",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "group_by": "The variables which should be grouped into like solutions.",
          "grouped": "The final list of templated solutions.",
          "query": "The subquery providing the solutions for the grouping.",
          "template": "The template of elements in the result list."
        },
        "@comment": "Group a query into a list with each element of the list specified by 'template' using a given variable set for the group."
      }
    ],
    "template": "Value",
    "query": "Query",
    "grouped": "Value",
    "group_by": {
      "@class": "xsd:string",
      "@type": "List"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Exp",
    "@inherits": [
      "ArithmeticExpression"
    ],
    "@documentation": [
      {
        "@properties": {
          "left": "The base.",
          "right": "The exponent."
        },
        "@comment": "Exponentiate a number."
      }
    ],
    "right": "ArithmeticExpression",
    "left": "ArithmeticExpression"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Floor",
    "@inherits": [
      "ArithmeticExpression"
    ],
    "@documentation": [
      {
        "@properties": {
          "argument": "The number to floor."
        },
        "@comment": "Find the integral part of a number."
      }
    ],
    "argument": "ArithmeticExpression"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "OrderBy",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "ordering": "A specification of the ordering of solutions.",
          "query": "The base query giving the solutions to order."
        },
        "@comment": "Orders query results according to an ordering specification."
      }
    ],
    "query": "Query",
    "ordering": {
      "@class": "OrderTemplate",
      "@type": "List"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Optional",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "query": "The query to run."
        },
        "@comment": "A query which will succeed (without bindings) even in the case of failure."
      }
    ],
    "query": "Query"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Not",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "query": "The query which must not hold."
        },
        "@comment": "The negation of a query. Provides no solution bindings, but will succeed if its sub-query fails."
      }
    ],
    "query": "Query"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "Lexical",
      "@fields": [
        "name"
      ]
    },
    "@id": "NamedParametricQuery",
    "@documentation": [
      {
        "@properties": {
          "name": "The name of the NamedParametricQuery to be retrieved.",
          "parameters": "Variable name list for auxilliary bindings.",
          "query": "The query AST as WOQL JSON."
        },
        "@comment": "A named parametric query which names a specific query for later retrieval and re-use and allows the specification of bindings for a specific set of variables in the query."
      }
    ],
    "query": "Query",
    "parameters": {
      "@class": "xsd:string",
      "@type": "List"
    },
    "name": "xsd:string"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Member",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "list": "The list of elements against which to generate or test.",
          "member": "The element to test for membership or to supply as generated."
        },
        "@comment": "Generate or test every element of a list."
      }
    ],
    "member": "DataValue",
    "list": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Link",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A URI or variable which is the target or object of the graph edge.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge.",
          "subject": "A URI or variable which is the source or subject of the graph edge."
        },
        "@comment": "Specify an edge pattern which is not terminal, but a link between objects."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "NodeValue",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Like",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "left": "The first string.",
          "right": "The second string.",
          "similarity": "Number between -1 and 1 which gives a scale for similarity."
        },
        "@comment": "Distance between strings, similar to a Levenstein distance."
      }
    ],
    "similarity": "DataValue",
    "right": "DataValue",
    "left": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Less",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "left": "The lesser element.",
          "right": "The greater element."
        },
        "@comment": "Predicate determining if one thing is less than another according to natural ordering."
      }
    ],
    "right": "DataValue",
    "left": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "RandomKey",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "base": "The URI base to the left of the key.",
          "uri": "The resulting URI."
        },
        "@comment": "Generates a key identical to those generated automatically by 'RandomKey' specifications."
      }
    ],
    "uri": "NodeValue",
    "base": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Plus",
    "@inherits": [
      "ArithmeticExpression"
    ],
    "@documentation": [
      {
        "@properties": {
          "left": "First operand of add.",
          "right": "Second operand of add."
        },
        "@comment": "Add two numbers."
      }
    ],
    "right": "ArithmeticExpression",
    "left": "ArithmeticExpression"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "PathStar",
    "@inherits": [
      "PathPattern"
    ],
    "@documentation": [
      {
        "@properties": {
          "star": "A path pattern."
        },
        "@comment": "The path pattern specified by 'star' may hold zero or more times in succession."
      }
    ],
    "star": "PathPattern"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "PathPredicate",
    "@inherits": [
      "PathPattern"
    ],
    "@documentation": [
      {
        "@properties": {
          "predicate": "The predicate to use in the pattern traversal."
        },
        "@comment": "A predicate to traverse."
      }
    ],
    "predicate": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "PathPlus",
    "@inherits": [
      "PathPattern"
    ],
    "@documentation": [
      {
        "@properties": {
          "plus": "A path patterns."
        },
        "@comment": "The path pattern specified by 'plus' must hold one or more times in succession."
      }
    ],
    "plus": "PathPattern"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "PathOr",
    "@inherits": [
      "PathPattern"
    ],
    "@documentation": [
      {
        "@properties": {
          "or": "A disjunction of path patterns."
        },
        "@comment": "A set of patterns in which each of the patterns can result in objects starting from our current subject set."
      }
    ],
    "or": {
      "@class": "PathPattern",
      "@type": "List"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Pad",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "char": "The padding character.",
          "result": "The result of the padding as a string.",
          "string": "The starting string.",
          "times": "The number of times to repeat the padding character."
        },
        "@comment": "Pad a string."
      }
    ],
    "times": "DataValue",
    "string": "DataValue",
    "result": "DataValue",
    "char": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "TripleCount",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "count": "The count of edges.",
          "resource": "The resource to obtain the edges from."
        },
        "@comment": "The number of edges in a database."
      }
    ],
    "resource": "xsd:string",
    "count": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Trim",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "trimmed": "The string to be trimmed.",
          "untrimmed": "The untrimmed string."
        },
        "@comment": "Trims whitespace from 'untrimmed'."
      }
    ],
    "untrimmed": "DataValue",
    "trimmed": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Sum",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "list": "The list of numbers to sum.",
          "result": "The result of the sum as a number."
        },
        "@comment": "Sum a list of strings."
      }
    ],
    "result": "DataValue",
    "list": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Substring",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "after": "The count of characters after substring as an integer or variable.",
          "before": "The count of characters before substring as an integer or variable.",
          "length": "The length of the string as an integer or variable.",
          "string": "The super-string as data or variable.",
          "substring": "The super-string as data or variable."
        },
        "@comment": "Finds the boundaries of a substring in a string."
      }
    ],
    "substring": "DataValue",
    "string": "DataValue",
    "length": "DataValue",
    "before": "DataValue",
    "after": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Split",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "list": "The result list of strings.",
          "pattern": "The splitting pattern.",
          "string": "The starting string."
        },
        "@comment": "Split a string."
      }
    ],
    "string": "DataValue",
    "pattern": "DataValue",
    "list": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Select",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "query": "The query which will be run prior to selection.",
          "variables": "The variables to select from the query."
        },
        "@comment": "Select specific variables from a query to return."
      }
    ],
    "variables": {
      "@class": "xsd:string",
      "@type": "List"
    },
    "query": "Query"
  },
  {
    "@type": "TaggedUnion",
    "@id": "DataValue",
    "@documentation": [
      {
        "@properties": {
          "data": "An xsd data type value.",
          "list": "A list of datavalues",
          "variable": "A variable."
        },
        "@comment": "A variable or node."
      }
    ],
    "variable": "xsd:string",
    "list": {
      "@class": "DataValue",
      "@type": "List"
    },
    "data": "sys:JSON"
  },
  {
    "@type": "TaggedUnion",
    "@id": "ArithmeticValue",
    "@inherits": [
      "ArithmeticExpression"
    ],
    "@documentation": [
      {
        "@properties": {
          "data": "An xsd data type value.",
          "variable": "A variable."
        },
        "@comment": "A variable or node."
      }
    ],
    "variable": "xsd:string",
    "data": "sys:JSON"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "Random"
    },
    "@id": "LogicalNamedParametricQuery",
    "@inherits": [
    ],
    "@documentation": [
      {
        "@properties": {
          "woqlString": "The query as a WOQL string.",
          "name": "The name of the NamedParametricQuery to be retrieved.",
          "markdownDescription": "Description of the query.",
          "parameters": "Variable name list for auxilliary bindings."
        }
      }
    ],
    "woqlString": "xsd:string",
    "parameters": {
      "@class": "xsd:string",
      "@type": "List"
    },
    "name": "xsd:string",
    "markdownDescription": {
      "@class": "xsd:string",
      "@type": "Optional"
    },
    "query": {
      "@class": "Query",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "Random"
    },
    "@id": "LogicalNamedQuery",
    "@inherits": [
    ],
    "@documentation": [
      {
        "@properties": {
          "woqlString": "The query as a WOQL string.",
          "markdownDescription": "Description of the query.",
          "name": "The name of the NamedQuery to be retrieved."
        }
      }
    ],
    "woqlString": "xsd:string",
    "name": "xsd:string",
    "markdownDescription": {
      "@class": "xsd:string",
      "@type": "Optional"
    },
    "query": {
      "@class": "Query",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "UpdateDocument",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "document": "The document to update. Must either have an '@id' or have a class specified key.",
          "identifier": "An optional returned identifier specifying the documentation location."
        },
        "@comment": "Update a document in the graph."
      }
    ],
    "identifier": {
      "@class": "NodeValue",
      "@type": "Optional"
    },
    "document": "Value"
  },
  {
    "@type": "TaggedUnion",
    "@id": "Indicator",
    "name": "xsd:string",
    "index": "xsd:nonNegativeInteger"
  },
  {
    "@type": "TaggedUnion",
    "@id": "Source",
    "url": "xsd:string",
    "post": "xsd:string"
  },
  {
    "@type": "Enum",
    "@id": "FormatType",
    "@value": [
      "csv"
    ]
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "ArithmeticExpression",
    "@abstract": [],
    "@subdocument": [],
    "@documentation": [
      {
        "@comment": "An abstract class specifying the AST super-class of all arithemtic expressions."
      }
    ]
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Concatenate",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "list": "The list to concatenate.",
          "result": "The result string."
        },
        "@comment": "Concatenate a list of strings."
      }
    ],
    "result": "DataValue",
    "list": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "AddedLink",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A URI or variable which is the target or object of the graph edge.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge.",
          "subject": "A URI or variable which is the source or subject of the graph edge."
        },
        "@comment": "Specify an edge pattern which links between nodes at *this* commit."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "NodeValue",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "And",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "and": "List of queries which must hold."
        },
        "@comment": "A conjunction of queries which must all have a solution."
      }
    ],
    "and": {
      "@class": "Query",
      "@type": "List"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "AddData",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A data value or variable which is the target or object of the graph edge. The variable must be bound.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge. The variable must be bound.",
          "subject": "A URI or variable which is the source or subject of the graph edge. The variable must be bound."
        },
        "@comment": "Add an edge with a data value."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "DataValue",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "AddTriple",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A URI, datatype or variable which is the target or object of the graph edge.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge.",
          "subject": "A URI or variable which is the source or subject of the graph edge."
        },
        "@comment": "Specify an edge to add to the graph."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "Value",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Dot",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "document": "Document which is being accessed.",
          "field": "The field from which the document which is being accessed.",
          "value": "The value for the document and field."
        },
        "@comment": "Extract the value of a key in a bound document."
      }
    ],
    "value": "DataValue",
    "field": "DataValue",
    "document": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Eval",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "expression": "The expression to be evaluated.",
          "result": "The numeric result."
        },
        "@comment": "Evaluate an arithmetic expression to obtain a result."
      }
    ],
    "result": "ArithmeticValue",
    "expression": "ArithmeticExpression"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Div",
    "@inherits": [
      "ArithmeticExpression"
    ],
    "@documentation": [
      {
        "@properties": {
          "left": "First operand of div.",
          "right": "Second operand of div."
        },
        "@comment": "Integer divide two numbers."
      }
    ],
    "right": "ArithmeticExpression",
    "left": "ArithmeticExpression"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "DeleteTriple",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A URI, datatype or variable which is the target or object of the graph edge.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge.",
          "subject": "A URI or variable which is the source or subject of the graph edge."
        },
        "@comment": "Specify an edge pattern to remove from the graph."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "Value",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "DeletedTriple",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A URI, datatype or variable which is the target or object of the graph edge.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge.",
          "subject": "A URI or variable which is the source or subject of the graph edge."
        },
        "@comment": "Specify an edge pattern which was *deleted* at *this commit*."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "Value",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Data",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "An optional graph (either 'instance' or 'schema')",
          "object": "A data type or variable which is the target or object of the graph edge.",
          "predicate": "A URI or variable which is the edge-label or predicate of the graph edge.",
          "subject": "A URI or variable which is the source or subject of the graph edge."
        },
        "@comment": "Specify an edge pattern which is terminal, and provides a data value association."
      }
    ],
    "subject": "NodeValue",
    "predicate": "NodeValue",
    "object": "DataValue",
    "graph": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "DeleteDocument",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "identifier": "An identifier specifying the documentation location to delete."
        },
        "@comment": "Delete a document from the graph."
      }
    ],
    "identifier": "NodeValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "InversePathPredicate",
    "@inherits": [
      "PathPattern"
    ],
    "@documentation": [
      {
        "@properties": {
          "predicate": "The predicate to use in reverse direction in the pattern traversal."
        },
        "@comment": "A predicate to traverse *backwards*."
      }
    ],
    "predicate": {
      "@class": "xsd:string",
      "@type": "Optional"
    }
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Join",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "list": "The list to concatenate.",
          "result": "The result string.",
          "separator": "The separator between each joined string"
        },
        "@comment": "Join a list of strings using 'separator'."
      }
    ],
    "separator": "DataValue",
    "result": "DataValue",
    "list": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Immediately",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "query": "The query from which to obtain the side-effects."
        },
        "@comment": "Attempts to perform all side-effecting operations immediately. Can have strange non-backtracking effects but can also increase performance. Use at your own risk."
      }
    ],
    "query": "Query"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "InsertDocument",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "document": "The document to insert. Must either have an '@id' or have a class specified key.",
          "identifier": "An optional returned identifier specifying the documentation location."
        },
        "@comment": "Insert a document in the graph."
      }
    ],
    "identifier": {
      "@class": "NodeValue",
      "@type": "Optional"
    },
    "document": "Value"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "Greater",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "left": "The greater element.",
          "right": "The lesser element."
        },
        "@comment": "Predicate determining if one thing is greater than another according to natural ordering."
      }
    ],
    "right": "DataValue",
    "left": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "HashKey",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "base": "The URI base to the left of the key.",
          "key_list": "List of data elements required to generate the key.",
          "uri": "The resulting URI."
        },
        "@comment": "Generates a key identical to those generated automatically by 'HashKey' specifications."
      }
    ],
    "uri": "NodeValue",
    "key_list": {
      "@class": "DataValue",
      "@type": "List"
    },
    "base": "DataValue"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "FieldValuePair",
    "@subdocument": [],
    "@documentation": [
      {
        "@properties": {
          "field": "The field or key of a dictionary value pair",
          "value": "The value of a dictionary value pair."
        },
        "@comment": "A representation of a JSON style dictionary, but with free variables. It is similar to an interpolated string in that it is a template with quoted data and substituted values."
      }
    ],
    "value": "Value",
    "field": "xsd:string"
  },
  {
    "@type": "Class",
    "@key": {
      "@type": "ValueHash"
    },
    "@id": "From",
    "@inherits": [
      "Query"
    ],
    "@documentation": [
      {
        "@properties": {
          "graph": "The graph filter: 'schema' or 'instance' or '*'.",
          "query": "The subquery with a new default graph."
        },
        "@comment": "Change the default read graph (between instance/schema)."
      }
    ],
    "query": "Query",
    "graph": "xsd:string"
  }
]
@hoijnet hoijnet added the bug Something isn't working label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant