This page is the complete reference for all WOQL query classes — the building blocks you combine to construct queries. Each class listed here corresponds to a WOQL operation (e.g., Triple, And, Select, GroupBy). Use this as a lookup when constructing queries programmatically or debugging query JSON. For a hands-on introduction, see WOQL Basics.
WOQL Schema
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.
Authored by: Gavin Mendel-Gleason
Schema version: v1.0.3
Auto-generated reference This page is generated from the authoritative woql.json schema definition (131 classes). Run npm run generate:woql to regenerate after schema changes.
Contents:
- Query operations (100 classes) — the main WOQL operations
- Path patterns (8 classes) — graph traversal expressions
- Arithmetic expressions (9 classes) — numeric operations
- Utility types (14 classes) — values, enums, and support types
Query operations
These classes represent WOQL query operations — the building blocks of all database queries.
Query
An abstract class which represents an arbitrary query AST.
Abstract
AddData
Add an edge with a data value.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. The variable must be bound. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. The variable must be bound. |
object | DataValue | A data value or variable which is the target or object of the graph edge. The variable must be bound. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
AddedData
Specify an edge pattern with data value which was added in this commit*.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | DataValue | A datatype or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
AddedLink
Specify an edge pattern which links between nodes at this commit.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | NodeValue | A URI or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
AddedTriple
Specify an edge pattern which was added at this commit.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | Value | A URI, datatype or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
AddLink
Add an edge which links between nodes in the graph.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | NodeValue | A URI or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
AddTriple
Specify an edge to add to the graph.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | Value | A URI, datatype or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
And
A conjunction of queries which must all have a solution.
Inherits: Query
| Property | Type | Description |
|---|---|---|
and | List(Query) | List of queries which must hold. |
Call
A call of a named parametric query. Variables will be passed to the named query and bound according to the results. Named queries can be (mutually) recursive.
Inherits: Query
| Property | Type | Description |
|---|---|---|
name | xsd:string | The name of the NamedParametricQuery to be retrieved. |
arguments | List(Value) | The arguments to use when binding formal parameters of the parametric query. |
Collect
Collect all solutions of a sub-query into a list. The template specifies what to collect from each solution, and the result is unified with into. If the query has no solutions, into is unified with the empty list.
Inherits: Query
| Property | Type | Description |
|---|---|---|
into | Value | The variable to bind the collected list of solutions. |
query | Query | The subquery whose solutions will be collected. |
template | Value | The template of elements in the result list. |
Comment
A comment. The query is disabled (not executed) and the comment serves as documentation.
Inherits: Query
| Property | Type | Description |
|---|---|---|
comment | DataValue | The comment string explaining why the query is disabled. |
query | Optional(Query) | The query which is commented out and will not be executed. |
Concatenate
Concatenate a list of strings.
Inherits: Query
| Property | Type | Description |
|---|---|---|
list | DataValue | The list to concatenate. |
result | DataValue | The result string. |
Count
Counts the number of solutions of a query.
Inherits: Query
| Property | Type | Description |
|---|---|---|
count | DataValue | The count of the number of solutions. |
query | Query | The query from which to obtain the count. |
Data
Specify an edge pattern which is terminal, and provides a data value association.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | DataValue | A data type or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
DateDuration
Tri-directional duration arithmetic for dates and dateTimes. Given any two of start, end, and duration, computes the third. Accepts xsd:date or xsd:dateTime for start/end and xsd:duration for duration. Uses end-of-month (EOM) preservation: if the input is the last day of its month, the result will be the last day of the target month. Duration output omits time components when they are zero.
Inherits: Query
| Property | Type | Description |
|---|---|---|
duration | DataValue | The xsd:duration between start and end. |
end | DataValue | The end date or dateTime. |
start | DataValue | The start date or dateTime. |
DayAfter
Computes the calendar day after the given date. Bidirectional: given date computes next, given next computes date.
Inherits: Query
| Property | Type | Description |
|---|---|---|
date | DataValue | The input date. |
next | DataValue | The next calendar day. |
DayBefore
Computes the calendar day before the given date. Bidirectional: given date computes previous, given previous computes date.
Inherits: Query
| Property | Type | Description |
|---|---|---|
date | DataValue | The input date. |
previous | DataValue | The previous calendar day. |
DeletedLink
An edge pattern specifying a link beween nodes deleted at this commit.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | NodeValue | A URI or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
DeleteDocument
Delete a document from the graph.
Inherits: Query
| Property | Type | Description |
|---|---|---|
identifier | NodeValue | An identifier specifying the documentation location to delete. |
DeletedTriple
Specify an edge pattern which was deleted at this commit.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | Value | A URI, datatype or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
DeleteLink
Delete an edge linking nodes.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. The variable must be bound. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. The variable must be bound. |
object | NodeValue | A URI or variable which is the target or object of the graph edge. The variable must be bound. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
DeleteTriple
Specify an edge pattern to remove from the graph.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | Value | A URI, datatype or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
Distinct
Ensure variables listed result in distinct solutions.
Inherits: Query
| Property | Type | Description |
|---|---|---|
query | Query | The query which will be run prior to selection. |
variables | List(xsd:string) | The variables which must be distinct from the query. |
Dot
Extract the value of a key in a bound document.
Inherits: Query
| Property | Type | Description |
|---|---|---|
document | DataValue | Document which is being accessed. |
field | DataValue | The field from which the document which is being accessed. |
value | DataValue | The value for the document and field. |
Equals
True whenever 'left' is the same as 'right'. Performs unification.
Inherits: Query
| Property | Type | Description |
|---|---|---|
left | DataValue | A URI, data value or variable. |
right | DataValue | A URI, data value or variable. |
Eval
Evaluate an arithmetic expression to obtain a result.
Inherits: Query
| Property | Type | Description |
|---|---|---|
expression | ArithmeticExpression | The expression to be evaluated. |
result | ArithmeticValue | The numeric result. |
From
Change the default read graph (between instance/schema).
Inherits: Query
| Property | Type | Description |
|---|---|---|
graph | xsd:string | The graph filter: 'schema' or 'instance' or '*'. |
query | Query | The subquery with a new default graph. |
Get
Inherits: Query
| Property | Type | Description |
|---|---|---|
columns | List(Column) | |
has_header | Optional(xsd:boolean) | |
resource | QueryResource |
Greater
Predicate determining if one thing is greater than another according to natural ordering.
Inherits: Query
| Property | Type | Description |
|---|---|---|
left | DataValue | The greater element. |
right | DataValue | The lesser element. |
GroupBy
Group a query into a list with each element of the list specified by 'template' using a given variable set for the group.
Inherits: Query
| Property | Type | Description |
|---|---|---|
group_by | List(xsd:string) | The variables which should be grouped into like solutions. |
grouped | Value | The final list of templated solutions. |
query | Query | The subquery providing the solutions for the grouping. |
template | Value | The template of elements in the result list. |
Gte
Predicate determining if one thing is greater than or equal to another according to natural ordering.
Inherits: Query
| Property | Type | Description |
|---|---|---|
left | DataValue | The greater or equal element. |
right | DataValue | The lesser or equal element. |
HashKey
Generates a key identical to those generated automatically by 'HashKey' specifications.
Inherits: Query
| Property | Type | Description |
|---|---|---|
base | DataValue | The URI base to the left of the key. |
key_list | List(DataValue) | List of data elements required to generate the key. |
uri | NodeValue | The resulting URI. |
If
A conditional which runs the then clause for every success from the test clause, otherwise runs the else clause.
Inherits: Query
| Property | Type | Description |
|---|---|---|
else | Query | A query which runs whenever test fails. |
test | Query | A query which will provide bindings for the then clause. |
then | Query | A query which will run for every solution of test with associated bindings. |
Immediately
Attempts to perform all side-effecting operations immediately. Can have strange non-backtracking effects but can also increase performance. Use at your own risk.
Inherits: Query
| Property | Type | Description |
|---|---|---|
query | Query | The query from which to obtain the side-effects. |
InRange
Predicate testing whether a value falls within a half-open range [Start, End). Succeeds if Start <= Value < End.
Inherits: Query
| Property | Type | Description |
|---|---|---|
value | DataValue | The value to test. |
start | DataValue | The inclusive lower bound. |
end | DataValue | The exclusive upper bound. |
InsertDocument
Insert a document in the graph.
Inherits: Query
| Property | Type | Description |
|---|---|---|
document | Value | The document to insert. Must either have an '@id' or have a class specified key. |
identifier | Optional(NodeValue) | An optional returned identifier specifying the documentation location. |
Interval
Constructs or deconstructs a half-open xdd:dateTimeInterval [start, end) from two date or dateTime endpoints. Bidirectional: given start+end computes interval, given interval extracts start+end. Endpoints are stored in UTC canonical form for correct lexical ordering.
Inherits: Query
| Property | Type | Description |
|---|---|---|
start | DataValue | Inclusive start date or dateTime. |
end | DataValue | Exclusive end date or dateTime. |
interval | DataValue | The xdd:dateTimeInterval value. |
IntervalDurationEnd
Relates an xdd:dateTimeInterval to its end endpoint and precise xsd:duration. Bidirectional: given interval extracts duration+end, given duration+end computes interval. Duration is a precise day/time count.
Inherits: Query
| Property | Type | Description |
|---|---|---|
duration | DataValue | The xsd:duration between start and end. |
end | DataValue | Exclusive end date or dateTime. |
interval | DataValue | The xdd:dateTimeInterval value. |
IntervalRelation
Allen's Interval Algebra: classifies or validates the temporal relationship between two half-open intervals [x_start, x_end) and [y_start, y_end). When relation is ground, validates that the named relation holds. When relation is a variable, determines which of the 13 Allen relations holds (deterministic). Supported relations: before, after, meets, met_by, overlaps, overlapped_by, starts, started_by, during, contains, finishes, finished_by, equals.
Inherits: Query
| Property | Type | Description |
|---|---|---|
relation | DataValue | The Allen relation name (string) or variable. |
x_start | DataValue | Inclusive start of interval X. |
x_end | DataValue | Exclusive end of interval X. |
y_start | DataValue | Inclusive start of interval Y. |
y_end | DataValue | Exclusive end of interval Y. |
IntervalRelationTyped
Allen's Interval Algebra on xdd:dateTimeInterval values. Classifies or validates the temporal relationship between two interval values. When relation is ground, validates that the named relation holds. When relation is a variable, determines which of the 13 Allen relations holds (deterministic). Supported relations: before, after, meets, met_by, overlaps, overlapped_by, starts, started_by, during, contains, finishes, finished_by, equals.
Inherits: Query
| Property | Type | Description |
|---|---|---|
relation | DataValue | The Allen relation name (string) or variable. |
x | DataValue | The first xdd:dateTimeInterval. |
y | DataValue | The second xdd:dateTimeInterval. |
IntervalStartDuration
Relates an xdd:dateTimeInterval to its start endpoint and precise xsd:duration. Bidirectional: given interval extracts start+duration, given start+duration computes interval. Duration is a precise day/time count.
Inherits: Query
| Property | Type | Description |
|---|---|---|
start | DataValue | Inclusive start date or dateTime. |
duration | DataValue | The xsd:duration between start and end. |
interval | DataValue | The xdd:dateTimeInterval value. |
Into
Change the default write graph (between instance/schema).
Inherits: Query
| Property | Type | Description |
|---|---|---|
graph | xsd:string | The graph filter: schema or instance. |
query | Query | The subquery with a new default write graph. |
IsA
Test (or generate) the type of an element.
Inherits: Query
| Property | Type | Description |
|---|---|---|
element | NodeValue | The element to test. |
type | NodeValue | The type of the element. |
IsoWeek
Computes the ISO 8601 week-numbering year and week number for a date. Accepts xsd:date or xsd:dateTime. Date must be ground. The ISO year may differ from the calendar year at year boundaries.
Inherits: Query
| Property | Type | Description |
|---|---|---|
date | DataValue | The input date or dateTime. |
week | DataValue | The ISO week number (1-53). |
year | DataValue | The ISO week-numbering year. |
Join
Join a list of strings using 'separator'.
Inherits: Query
| Property | Type | Description |
|---|---|---|
list | DataValue | The list to concatenate. |
result | DataValue | The result string. |
separator | DataValue | The separator between each joined string |
Length
The length of a list.
Inherits: Query
| Property | Type | Description |
|---|---|---|
length | DataValue | The length of the list. |
list | DataValue | The list of which to find the length. |
Less
Predicate determining if one thing is less than another according to natural ordering.
Inherits: Query
| Property | Type | Description |
|---|---|---|
left | DataValue | The lesser element. |
right | DataValue | The greater element. |
LexicalKey
Generates a key identical to those generated automatically by 'LexicalKey' specifications.
Inherits: Query
| Property | Type | Description |
|---|---|---|
base | DataValue | The URI base to the left of the key. |
key_list | List(DataValue) | List of data elements required to generate the key. |
uri | NodeValue | The resulting URI. |
Like
Distance between strings, similar to a Levenstein distance.
Inherits: Query
| Property | Type | Description |
|---|---|---|
left | DataValue | The first string. |
right | DataValue | The second string. |
similarity | DataValue | Number between -1 and 1 which gives a scale for similarity. |
Limit
Limit a query to a particular maximum number of solutions specified by 'limit'. Can be used with start to perform paging.
Inherits: Query
| Property | Type | Description |
|---|---|---|
limit | xsd:nonNegativeInteger | Maximum number of solutions. |
query | Query | The query to perform. |
Link
Specify an edge pattern which is not terminal, but a link between objects.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | NodeValue | A URI or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
ListToSet
Converts a list to a set by removing duplicates and sorting.
Inherits: Query
| Property | Type | Description |
|---|---|---|
list | DataValue | The input list. |
set | DataValue | The resulting set with duplicates removed. |
Lower
Lowercase a string.
Inherits: Query
| Property | Type | Description |
|---|---|---|
lower | DataValue | The lower case string. |
mixed | DataValue | The mixed case string. |
Lte
Predicate determining if one thing is less than or equal to another according to natural ordering.
Inherits: Query
| Property | Type | Description |
|---|---|---|
left | DataValue | The lesser or equal element. |
right | DataValue | The greater or equal element. |
Member
Generate or test every element of a list.
Inherits: Query
| Property | Type | Description |
|---|---|---|
list | DataValue | The list of elements against which to generate or test. |
member | DataValue | The element to test for membership or to supply as generated. |
MonthEndDate
Computes the last day of the month for a given year-month. Handles leap years correctly. YearMonth must be ground.
Inherits: Query
| Property | Type | Description |
|---|---|---|
year_month | DataValue | A gYearMonth value (e.g. 2024-02). |
date | DataValue | The resulting xsd:date for the last day of the month. |
MonthEndDates
Generator: produces every last-of-month date in the half-open range [Start, End).
Inherits: Query
| Property | Type | Description |
|---|---|---|
date | DataValue | The generated last-of-month date. |
start | DataValue | The inclusive start date. |
end | DataValue | The exclusive end date. |
MonthStartDate
Computes the first day of the month for a given year-month. YearMonth must be ground.
Inherits: Query
| Property | Type | Description |
|---|---|---|
year_month | DataValue | A gYearMonth value (e.g. 2024-01). |
date | DataValue | The resulting xsd:date for the first day of the month. |
MonthStartDates
Generator: produces every first-of-month date in the half-open range [Start, End).
Inherits: Query
| Property | Type | Description |
|---|---|---|
date | DataValue | The generated first-of-month date. |
start | DataValue | The inclusive start date. |
end | DataValue | The exclusive end date. |
Not
The negation of a query. Provides no solution bindings, but will succeed if its sub-query fails.
Inherits: Query
| Property | Type | Description |
|---|---|---|
query | Query | The query which must not hold. |
Once
Obtains exactly one solution from a query. Simliar to a limit of 1.
Inherits: Query
| Property | Type | Description |
|---|---|---|
query | Query | The query from which to obtain a solution. |
Optional
A query which will succeed (without bindings) even in the case of failure.
Inherits: Query
| Property | Type | Description |
|---|---|---|
query | Query | The query to run. |
Or
A disjunction of queries any of which can provide a solution.
Inherits: Query
| Property | Type | Description |
|---|---|---|
or | List(Query) | List of queries which may hold. |
OrderBy
Orders query results according to an ordering specification.
Inherits: Query
| Property | Type | Description |
|---|---|---|
ordering | List(OrderTemplate) | A specification of the ordering of solutions. |
query | Query | The base query giving the solutions to order. |
Pad
Pad a string.
Inherits: Query
| Property | Type | Description |
|---|---|---|
char | DataValue | The padding character. |
result | DataValue | The result of the padding as a string. |
string | DataValue | The starting string. |
times | DataValue | The number of times to repeat the padding character. |
Path
Find a path through the graph according to 'pattern'. This 'pattern' is a regular graph expression which avoids cycles.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | Value | The starting node. |
object | Value | The ending node. |
path | Optional(Value) | An optional list of edges traversed. |
pattern | PathPattern | The pattern which describes how to traverse edges. |
Pin
Keep a subquery from being optimized, 'Pin' it in the order given
Inherits: Query
| Property | Type | Description |
|---|---|---|
query | Query | The query to pin |
RandomKey
Generates a key identical to those generated automatically by 'RandomKey' specifications.
Inherits: Query
| Property | Type | Description |
|---|---|---|
base | DataValue | The URI base to the left of the key. |
uri | NodeValue | The resulting URI. |
RangeMax
Find the maximum value in a list using the standard ordering (woql_less). Works with any comparable types: numbers, dates, strings. Empty list produces no bindings.
Inherits: Query
| Property | Type | Description |
|---|---|---|
list | DataValue | The list of values to search. |
result | DataValue | The maximum value found. |
RangeMin
Find the minimum value in a list using the standard ordering (woql_less). Works with any comparable types: numbers, dates, strings. Empty list produces no bindings.
Inherits: Query
| Property | Type | Description |
|---|---|---|
list | DataValue | The list of values to search. |
result | DataValue | The minimum value found. |
ReadDocument
Read a full document from an identifier.
Inherits: Query
| Property | Type | Description |
|---|---|---|
document | Value | Variable which will be bound to the document. |
identifier | NodeValue | The URI of the document to load. |
Regexp
Test a string against a PCRE style regex pattern.
Inherits: Query
| Property | Type | Description |
|---|---|---|
pattern | DataValue | The PCRE style pattern. |
result | Optional(DataValue) | An optional result list of matches. |
string | DataValue | The string to test. |
Select
Select specific variables from a query to return.
Inherits: Query
| Property | Type | Description |
|---|---|---|
query | Query | The query which will be run prior to selection. |
variables | List(xsd:string) | The variables to select from the query. |
Sequence
Generates a sequence of values in the half-open range [Start, End). When Value is unbound, produces each value via backtracking. Supports integer and decimal types.
Inherits: Query
| Property | Type | Description |
|---|---|---|
value | DataValue | The generated sequence value. |
start | DataValue | The inclusive start of the sequence. |
end | DataValue | The exclusive end of the sequence. |
step | Optional(DataValue) | Optional increment per step. Defaults to 1 for integers, 1.0 for decimals. |
count | Optional(DataValue) | Optional total count. If bound, validates. If unbound, unifies with actual count. |
SetDifference
Computes the set difference of two lists (elements in list_a but not in list_b).
Inherits: Query
| Property | Type | Description |
|---|---|---|
list_a | DataValue | The first list. |
list_b | DataValue | The second list. |
result | DataValue | The resulting set difference. |
SetIntersection
Computes the set intersection of two lists (elements in both list_a and list_b).
Inherits: Query
| Property | Type | Description |
|---|---|---|
list_a | DataValue | The first list. |
list_b | DataValue | The second list. |
result | DataValue | The resulting set intersection. |
SetMember
Tests if an element is a member of a set.
Inherits: Query
| Property | Type | Description |
|---|---|---|
element | DataValue | The element to check for membership. |
set | DataValue | The set (list) to check membership in. |
SetUnion
Computes the set union of two lists (elements in either list_a or list_b).
Inherits: Query
| Property | Type | Description |
|---|---|---|
list_a | DataValue | The first list. |
list_b | DataValue | The second list. |
result | DataValue | The resulting set union. |
Size
Size of a database in magic units (bytes?).
Inherits: Query
| Property | Type | Description |
|---|---|---|
resource | xsd:string | The resource to obtain the size of. |
size | DataValue | The size. |
Slice
Extracts a contiguous subsequence from a list.
Inherits: Query
| Property | Type | Description |
|---|---|---|
end | Optional(DataValue) | The end index (exclusive, optional). |
list | DataValue | The input list to slice. |
result | DataValue | The resulting sliced list. |
start | DataValue | The start index (0-based). |
Split
Split a string.
Inherits: Query
| Property | Type | Description |
|---|---|---|
list | DataValue | The result list of strings. |
pattern | DataValue | The splitting pattern. |
string | DataValue | The starting string. |
Start
Start a query at the nth solution specified by 'start'. Allows resumption and paging of queries.
Inherits: Query
| Property | Type | Description |
|---|---|---|
query | Query | The query to perform. |
start | xsd:nonNegativeInteger | The numbered solution to start at. |
Substring
Finds the boundaries of a substring in a string.
Inherits: Query
| Property | Type | Description |
|---|---|---|
after | DataValue | The count of characters after substring as an integer or variable. |
before | DataValue | The count of characters before substring as an integer or variable. |
length | DataValue | The length of the string as an integer or variable. |
string | DataValue | The super-string as data or variable. |
substring | DataValue | The super-string as data or variable. |
Subsumption
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.
Inherits: Query
| Property | Type | Description |
|---|---|---|
child | NodeValue | The child class as a URI or variable. |
parent | NodeValue | The parent class as a URI or variable |
Sum
Sum a list of strings.
Inherits: Query
| Property | Type | Description |
|---|---|---|
list | DataValue | The list of numbers to sum. |
result | DataValue | The result of the sum as a number. |
Trim
Trims whitespace from 'untrimmed'.
Inherits: Query
| Property | Type | Description |
|---|---|---|
trimmed | DataValue | The string to be trimmed. |
untrimmed | DataValue | The untrimmed string. |
Triple
Specify an edge pattern in the graph.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | Value | A URI, datatype or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
TripleCount
The number of edges in a database.
Inherits: Query
| Property | Type | Description |
|---|---|---|
count | DataValue | The count of edges. |
resource | xsd:string | The resource to obtain the edges from. |
TripleNext
Find the next object value after a reference for a given subject-predicate pair. When object is bound and next is free, finds the smallest next value greater than object. When next is bound and object is free, finds the largest object value less than next.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | Value | The current object value or the result of lookup by next. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
next | Value | The next object value or the reference upper bound. |
TriplePrevious
Find the previous object value before a reference for a given subject-predicate pair. When object is bound and previous is free, finds the largest previous value less than object. When previous is bound and object is free, finds the smallest object value greater than previous.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | Value | The current object value or the result of lookup by previous. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
previous | Value | The previous object value or the reference lower bound. |
TripleSlice
Specify an edge pattern with a half-open value range [low, high) on the object. Returns triples whose object value falls within the range.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | Value | A URI, datatype or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
high | Value | The exclusive upper bound of the value range. |
low | Value | The inclusive lower bound of the value range. |
TripleSliceRev
Specify an edge pattern with a half-open value range [low, high) on the object, returning triples in reverse (descending) object order. Same semantics as TripleSlice but iterates from highest to lowest value.
Inherits: Query
| Property | Type | Description |
|---|---|---|
subject | NodeValue | A URI or variable which is the source or subject of the graph edge. |
predicate | NodeValue | A URI or variable which is the edge-label or predicate of the graph edge. |
object | Value | A URI, datatype or variable which is the target or object of the graph edge. |
graph | Optional(xsd:string) | An optional graph (either 'instance' or 'schema') |
high | Value | The exclusive upper bound of the value range. |
low | Value | The inclusive lower bound of the value range. |
True
The query which is always true.
Inherits: Query
Typecast
Casts one type as another if possible.
Inherits: Query
| Property | Type | Description |
|---|---|---|
result | Value | The resulting value after cast. |
type | NodeValue | The type to which to cast. |
value | Value | The value to cast. |
TypeOf
TypeOf gives the type of an element.
Inherits: Query
| Property | Type | Description |
|---|---|---|
type | NodeValue | The URI which that specifies the type. |
value | Value | The value of which to obtain the type. |
UpdateDocument
Update a document in the graph.
Inherits: Query
| Property | Type | Description |
|---|---|---|
document | Value | The document to update. Must either have an '@id' or have a class specified key. |
identifier | Optional(NodeValue) | An optional returned identifier specifying the documentation location. |
Upper
Uppercase a string.
Inherits: Query
| Property | Type | Description |
|---|---|---|
mixed | DataValue | The mixed case string. |
upper | DataValue | The upper case string. |
Using
Select a specific collection for query.
Inherits: Query
| Property | Type | Description |
|---|---|---|
collection | xsd:string | The resource over which to run the query. |
query | Query | The query which will be run on the selected collection. |
Weekday
Computes the ISO 8601 weekday number (Monday=1, Sunday=7) for a date. Accepts xsd:date or xsd:dateTime. Date must be ground.
Inherits: Query
| Property | Type | Description |
|---|---|---|
date | DataValue | The input date or dateTime. |
weekday | DataValue | The ISO weekday number (1=Monday, 7=Sunday). |
WeekdaySundayStart
Computes the US-convention weekday number (Sunday=1, Saturday=7) for a date. Accepts xsd:date or xsd:dateTime. Date must be ground.
Inherits: Query
| Property | Type | Description |
|---|---|---|
date | DataValue | The input date or dateTime. |
weekday | DataValue | The US weekday number (1=Sunday, 7=Saturday). |
Path patterns
Path patterns describe how to traverse edges in the graph. They form a regular expression-like language over graph edges.
PathPattern
Abstract
InversePathPredicate
A predicate to traverse backwards.
Inherits: PathPattern
| Property | Type | Description |
|---|---|---|
predicate | Optional(xsd:string) | The predicate to use in reverse direction in the pattern traversal. |
PathOr
A set of patterns in which each of the patterns can result in objects starting from our current subject set.
Inherits: PathPattern
| Property | Type | Description |
|---|---|---|
or | List(PathPattern) | A disjunction of path patterns. |
PathPlus
The path pattern specified by 'plus' must hold one or more times in succession.
Inherits: PathPattern
| Property | Type | Description |
|---|---|---|
plus | PathPattern | A path patterns. |
PathPredicate
A predicate to traverse.
Inherits: PathPattern
| Property | Type | Description |
|---|---|---|
predicate | Optional(xsd:string) | The predicate to use in the pattern traversal. |
PathSequence
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.
Inherits: PathPattern
| Property | Type | Description |
|---|---|---|
sequence | List(PathPattern) | A sequence of path patterns. |
PathStar
The path pattern specified by 'star' may hold zero or more times in succession.
Inherits: PathPattern
| Property | Type | Description |
|---|---|---|
star | PathPattern | A path pattern. |
PathTimes
The path pattern specified by 'times' may hold 'from' to 'to' times in succession.
Inherits: PathPattern
| Property | Type | Description |
|---|---|---|
from | xsd:nonNegativeInteger | The number of times to start the repetition of the pattern |
times | PathPattern | A path pattern. |
to | xsd:nonNegativeInteger | The number of times after which to end the repeition of the pattern. |
Arithmetic expressions
Arithmetic expression classes for numeric computations within queries.
ArithmeticExpression
An abstract class specifying the AST super-class of all arithemtic expressions.
Abstract
ArithmeticValue
A variable or node.
Tagged Union · Inherits: ArithmeticExpression
| Property | Type | Description |
|---|---|---|
data | xsd:anySimpleType | An xsd data type value. |
variable | xsd:string | A variable. |
Div
Integer divide two numbers.
Inherits: ArithmeticExpression
| Property | Type | Description |
|---|---|---|
left | ArithmeticExpression | First operand of div. |
right | ArithmeticExpression | Second operand of div. |
Divide
Divide two numbers.
Inherits: ArithmeticExpression
| Property | Type | Description |
|---|---|---|
left | ArithmeticExpression | First operand of divide. |
right | ArithmeticExpression | Second operand of divide. |
Exp
Exponentiate a number.
Inherits: ArithmeticExpression
| Property | Type | Description |
|---|---|---|
left | ArithmeticExpression | The base. |
right | ArithmeticExpression | The exponent. |
Floor
Find the integral part of a number.
Inherits: ArithmeticExpression
| Property | Type | Description |
|---|---|---|
argument | ArithmeticExpression | The number to floor. |
Minus
Subtract two numbers.
Inherits: ArithmeticExpression
| Property | Type | Description |
|---|---|---|
left | ArithmeticExpression | First operand of minus. |
right | ArithmeticExpression | Second operand of minus. |
Plus
Add two numbers.
Inherits: ArithmeticExpression
| Property | Type | Description |
|---|---|---|
left | ArithmeticExpression | First operand of add. |
right | ArithmeticExpression | Second operand of add. |
Times
Multiply two numbers.
Inherits: ArithmeticExpression
| Property | Type | Description |
|---|---|---|
left | ArithmeticExpression | First operand of times. |
right | ArithmeticExpression | Second operand of times. |
Utility types
Support types used as field values in query classes — values, resources, columns, and enumerations.
Column
| Property | Type | Description |
|---|---|---|
indicator | Indicator | |
type | Optional(xsd:string) | |
variable | xsd:string |
DataValue
A variable or node.
Tagged Union
| Property | Type | Description |
|---|---|---|
data | xsd:anySimpleType | An xsd data type value. |
list | List(DataValue) | A list of datavalues |
variable | xsd:string | A variable. |
DictionaryTemplate
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.
| Property | Type | Description |
|---|---|---|
data | Set(FieldValuePair) | Pairs of Key-Values to be constructed into a dictionary |
FieldValuePair
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.
| Property | Type | Description |
|---|---|---|
field | xsd:string | The field or key of a dictionary value pair |
value | Value | The value of a dictionary value pair. |
FormatType
Enum
Values: csv
| Property | Type | Description |
|---|---|---|
@value | ["csv"] |
Indicator
Tagged Union
| Property | Type | Description |
|---|---|---|
index | xsd:nonNegativeInteger | |
name | xsd:string |
NamedParametricQuery
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.
| Property | Type | Description |
|---|---|---|
name | xsd:string | The name of the NamedParametricQuery to be retrieved. |
parameters | List(xsd:string) | Variable name list for auxilliary bindings. |
query | Query | The query AST as WOQL JSON. |
NamedQuery
A named query names a specific query for later retrieval and re-use.
| Property | Type | Description |
|---|---|---|
name | xsd:string | The name of the NamedQuery to be retrieved |
query | Query | The query AST as WOQL JSON |
NodeValue
A variable or node.
Tagged Union
| Property | Type | Description |
|---|---|---|
node | xsd:string | A URI representing a resource. |
variable | xsd:string | A variable. |
Order
Enum
Values: asc, desc
| Property | Type | Description |
|---|---|---|
@value | ["asc","desc"] |
OrderTemplate
The order template, consisting of the variable and ordering direction.
| Property | Type | Description |
|---|---|---|
order | Order | An enum either 'asc' or 'desc'. |
variable | xsd:string | The variable to order. |
QueryResource
Tagged Union
| Property | Type | Description |
|---|---|---|
format | FormatType | |
options | Optional(xdd:json) | |
source | Source |
Source
Tagged Union
| Property | Type | Description |
|---|---|---|
post | xsd:string | |
url | xsd:string |
Value
A variable, node or data point.
Tagged Union
| Property | Type | Description |
|---|---|---|
data | xsd:anySimpleType | An xsd data type value. |
dictionary | DictionaryTemplate | |
list | List(Value) | A list of datavalues |
node | xsd:string | A URI representing a resource. |
variable | xsd:string | A variable. |