WOQL Class Reference Guide

Open inAnthropic

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

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

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge. The variable must be bound.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge. The variable must be bound.
objectDataValueA data value or variable which is the target or object of the graph edge. The variable must be bound.
graphOptional(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

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectDataValueA datatype or variable which is the target or object of the graph edge.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')

Specify an edge pattern which links between nodes at this commit.

Inherits: Query

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectNodeValueA URI or variable which is the target or object of the graph edge.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')

AddedTriple

Specify an edge pattern which was added at this commit.

Inherits: Query

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectValueA URI, datatype or variable which is the target or object of the graph edge.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')

Add an edge which links between nodes in the graph.

Inherits: Query

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectNodeValueA URI or variable which is the target or object of the graph edge.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')

AddTriple

Specify an edge to add to the graph.

Inherits: Query

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectValueA URI, datatype or variable which is the target or object of the graph edge.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')

And

A conjunction of queries which must all have a solution.

Inherits: Query

PropertyTypeDescription
andList(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

PropertyTypeDescription
namexsd:stringThe name of the NamedParametricQuery to be retrieved.
argumentsList(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

PropertyTypeDescription
intoValueThe variable to bind the collected list of solutions.
queryQueryThe subquery whose solutions will be collected.
templateValueThe template of elements in the result list.

Comment

A comment. The query is disabled (not executed) and the comment serves as documentation.

Inherits: Query

PropertyTypeDescription
commentDataValueThe comment string explaining why the query is disabled.
queryOptional(Query)The query which is commented out and will not be executed.

Concatenate

Concatenate a list of strings.

Inherits: Query

PropertyTypeDescription
listDataValueThe list to concatenate.
resultDataValueThe result string.

Count

Counts the number of solutions of a query.

Inherits: Query

PropertyTypeDescription
countDataValueThe count of the number of solutions.
queryQueryThe query from which to obtain the count.

Data

Specify an edge pattern which is terminal, and provides a data value association.

Inherits: Query

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectDataValueA data type or variable which is the target or object of the graph edge.
graphOptional(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

PropertyTypeDescription
durationDataValueThe xsd:duration between start and end.
endDataValueThe end date or dateTime.
startDataValueThe start date or dateTime.

DayAfter

Computes the calendar day after the given date. Bidirectional: given date computes next, given next computes date.

Inherits: Query

PropertyTypeDescription
dateDataValueThe input date.
nextDataValueThe next calendar day.

DayBefore

Computes the calendar day before the given date. Bidirectional: given date computes previous, given previous computes date.

Inherits: Query

PropertyTypeDescription
dateDataValueThe input date.
previousDataValueThe previous calendar day.

An edge pattern specifying a link beween nodes deleted at this commit.

Inherits: Query

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectNodeValueA URI or variable which is the target or object of the graph edge.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')

DeleteDocument

Delete a document from the graph.

Inherits: Query

PropertyTypeDescription
identifierNodeValueAn identifier specifying the documentation location to delete.

DeletedTriple

Specify an edge pattern which was deleted at this commit.

Inherits: Query

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectValueA URI, datatype or variable which is the target or object of the graph edge.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')

Delete an edge linking nodes.

Inherits: Query

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge. The variable must be bound.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge. The variable must be bound.
objectNodeValueA URI or variable which is the target or object of the graph edge. The variable must be bound.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')

DeleteTriple

Specify an edge pattern to remove from the graph.

Inherits: Query

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectValueA URI, datatype or variable which is the target or object of the graph edge.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')

Distinct

Ensure variables listed result in distinct solutions.

Inherits: Query

PropertyTypeDescription
queryQueryThe query which will be run prior to selection.
variablesList(xsd:string)The variables which must be distinct from the query.

Dot

Extract the value of a key in a bound document.

Inherits: Query

PropertyTypeDescription
documentDataValueDocument which is being accessed.
fieldDataValueThe field from which the document which is being accessed.
valueDataValueThe value for the document and field.

Equals

True whenever 'left' is the same as 'right'. Performs unification.

Inherits: Query

PropertyTypeDescription
leftDataValueA URI, data value or variable.
rightDataValueA URI, data value or variable.

Eval

Evaluate an arithmetic expression to obtain a result.

Inherits: Query

PropertyTypeDescription
expressionArithmeticExpressionThe expression to be evaluated.
resultArithmeticValueThe numeric result.

From

Change the default read graph (between instance/schema).

Inherits: Query

PropertyTypeDescription
graphxsd:stringThe graph filter: 'schema' or 'instance' or '*'.
queryQueryThe subquery with a new default graph.

Get

Inherits: Query

PropertyTypeDescription
columnsList(Column)
has_headerOptional(xsd:boolean)
resourceQueryResource

Greater

Predicate determining if one thing is greater than another according to natural ordering.

Inherits: Query

PropertyTypeDescription
leftDataValueThe greater element.
rightDataValueThe 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

PropertyTypeDescription
group_byList(xsd:string)The variables which should be grouped into like solutions.
groupedValueThe final list of templated solutions.
queryQueryThe subquery providing the solutions for the grouping.
templateValueThe 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

PropertyTypeDescription
leftDataValueThe greater or equal element.
rightDataValueThe lesser or equal element.

HashKey

Generates a key identical to those generated automatically by 'HashKey' specifications.

Inherits: Query

PropertyTypeDescription
baseDataValueThe URI base to the left of the key.
key_listList(DataValue)List of data elements required to generate the key.
uriNodeValueThe resulting URI.

If

A conditional which runs the then clause for every success from the test clause, otherwise runs the else clause.

Inherits: Query

PropertyTypeDescription
elseQueryA query which runs whenever test fails.
testQueryA query which will provide bindings for the then clause.
thenQueryA 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

PropertyTypeDescription
queryQueryThe 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

PropertyTypeDescription
valueDataValueThe value to test.
startDataValueThe inclusive lower bound.
endDataValueThe exclusive upper bound.

InsertDocument

Insert a document in the graph.

Inherits: Query

PropertyTypeDescription
documentValueThe document to insert. Must either have an '@id' or have a class specified key.
identifierOptional(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

PropertyTypeDescription
startDataValueInclusive start date or dateTime.
endDataValueExclusive end date or dateTime.
intervalDataValueThe 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

PropertyTypeDescription
durationDataValueThe xsd:duration between start and end.
endDataValueExclusive end date or dateTime.
intervalDataValueThe 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

PropertyTypeDescription
relationDataValueThe Allen relation name (string) or variable.
x_startDataValueInclusive start of interval X.
x_endDataValueExclusive end of interval X.
y_startDataValueInclusive start of interval Y.
y_endDataValueExclusive 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

PropertyTypeDescription
relationDataValueThe Allen relation name (string) or variable.
xDataValueThe first xdd:dateTimeInterval.
yDataValueThe 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

PropertyTypeDescription
startDataValueInclusive start date or dateTime.
durationDataValueThe xsd:duration between start and end.
intervalDataValueThe xdd:dateTimeInterval value.

Into

Change the default write graph (between instance/schema).

Inherits: Query

PropertyTypeDescription
graphxsd:stringThe graph filter: schema or instance.
queryQueryThe subquery with a new default write graph.

IsA

Test (or generate) the type of an element.

Inherits: Query

PropertyTypeDescription
elementNodeValueThe element to test.
typeNodeValueThe 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

PropertyTypeDescription
dateDataValueThe input date or dateTime.
weekDataValueThe ISO week number (1-53).
yearDataValueThe ISO week-numbering year.

Join

Join a list of strings using 'separator'.

Inherits: Query

PropertyTypeDescription
listDataValueThe list to concatenate.
resultDataValueThe result string.
separatorDataValueThe separator between each joined string

Length

The length of a list.

Inherits: Query

PropertyTypeDescription
lengthDataValueThe length of the list.
listDataValueThe list of which to find the length.

Less

Predicate determining if one thing is less than another according to natural ordering.

Inherits: Query

PropertyTypeDescription
leftDataValueThe lesser element.
rightDataValueThe greater element.

LexicalKey

Generates a key identical to those generated automatically by 'LexicalKey' specifications.

Inherits: Query

PropertyTypeDescription
baseDataValueThe URI base to the left of the key.
key_listList(DataValue)List of data elements required to generate the key.
uriNodeValueThe resulting URI.

Like

Distance between strings, similar to a Levenstein distance.

Inherits: Query

PropertyTypeDescription
leftDataValueThe first string.
rightDataValueThe second string.
similarityDataValueNumber 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

PropertyTypeDescription
limitxsd:nonNegativeIntegerMaximum number of solutions.
queryQueryThe query to perform.

Specify an edge pattern which is not terminal, but a link between objects.

Inherits: Query

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectNodeValueA URI or variable which is the target or object of the graph edge.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')

ListToSet

Converts a list to a set by removing duplicates and sorting.

Inherits: Query

PropertyTypeDescription
listDataValueThe input list.
setDataValueThe resulting set with duplicates removed.

Lower

Lowercase a string.

Inherits: Query

PropertyTypeDescription
lowerDataValueThe lower case string.
mixedDataValueThe mixed case string.

Lte

Predicate determining if one thing is less than or equal to another according to natural ordering.

Inherits: Query

PropertyTypeDescription
leftDataValueThe lesser or equal element.
rightDataValueThe greater or equal element.

Member

Generate or test every element of a list.

Inherits: Query

PropertyTypeDescription
listDataValueThe list of elements against which to generate or test.
memberDataValueThe 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

PropertyTypeDescription
year_monthDataValueA gYearMonth value (e.g. 2024-02).
dateDataValueThe 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

PropertyTypeDescription
dateDataValueThe generated last-of-month date.
startDataValueThe inclusive start date.
endDataValueThe exclusive end date.

MonthStartDate

Computes the first day of the month for a given year-month. YearMonth must be ground.

Inherits: Query

PropertyTypeDescription
year_monthDataValueA gYearMonth value (e.g. 2024-01).
dateDataValueThe 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

PropertyTypeDescription
dateDataValueThe generated first-of-month date.
startDataValueThe inclusive start date.
endDataValueThe exclusive end date.

Not

The negation of a query. Provides no solution bindings, but will succeed if its sub-query fails.

Inherits: Query

PropertyTypeDescription
queryQueryThe query which must not hold.

Once

Obtains exactly one solution from a query. Simliar to a limit of 1.

Inherits: Query

PropertyTypeDescription
queryQueryThe query from which to obtain a solution.

Optional

A query which will succeed (without bindings) even in the case of failure.

Inherits: Query

PropertyTypeDescription
queryQueryThe query to run.

Or

A disjunction of queries any of which can provide a solution.

Inherits: Query

PropertyTypeDescription
orList(Query)List of queries which may hold.

OrderBy

Orders query results according to an ordering specification.

Inherits: Query

PropertyTypeDescription
orderingList(OrderTemplate)A specification of the ordering of solutions.
queryQueryThe base query giving the solutions to order.

Pad

Pad a string.

Inherits: Query

PropertyTypeDescription
charDataValueThe padding character.
resultDataValueThe result of the padding as a string.
stringDataValueThe starting string.
timesDataValueThe 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

PropertyTypeDescription
subjectValueThe starting node.
objectValueThe ending node.
pathOptional(Value)An optional list of edges traversed.
patternPathPatternThe pattern which describes how to traverse edges.

Pin

Keep a subquery from being optimized, 'Pin' it in the order given

Inherits: Query

PropertyTypeDescription
queryQueryThe query to pin

RandomKey

Generates a key identical to those generated automatically by 'RandomKey' specifications.

Inherits: Query

PropertyTypeDescription
baseDataValueThe URI base to the left of the key.
uriNodeValueThe 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

PropertyTypeDescription
listDataValueThe list of values to search.
resultDataValueThe 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

PropertyTypeDescription
listDataValueThe list of values to search.
resultDataValueThe minimum value found.

ReadDocument

Read a full document from an identifier.

Inherits: Query

PropertyTypeDescription
documentValueVariable which will be bound to the document.
identifierNodeValueThe URI of the document to load.

Regexp

Test a string against a PCRE style regex pattern.

Inherits: Query

PropertyTypeDescription
patternDataValueThe PCRE style pattern.
resultOptional(DataValue)An optional result list of matches.
stringDataValueThe string to test.

Select

Select specific variables from a query to return.

Inherits: Query

PropertyTypeDescription
queryQueryThe query which will be run prior to selection.
variablesList(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

PropertyTypeDescription
valueDataValueThe generated sequence value.
startDataValueThe inclusive start of the sequence.
endDataValueThe exclusive end of the sequence.
stepOptional(DataValue)Optional increment per step. Defaults to 1 for integers, 1.0 for decimals.
countOptional(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

PropertyTypeDescription
list_aDataValueThe first list.
list_bDataValueThe second list.
resultDataValueThe resulting set difference.

SetIntersection

Computes the set intersection of two lists (elements in both list_a and list_b).

Inherits: Query

PropertyTypeDescription
list_aDataValueThe first list.
list_bDataValueThe second list.
resultDataValueThe resulting set intersection.

SetMember

Tests if an element is a member of a set.

Inherits: Query

PropertyTypeDescription
elementDataValueThe element to check for membership.
setDataValueThe set (list) to check membership in.

SetUnion

Computes the set union of two lists (elements in either list_a or list_b).

Inherits: Query

PropertyTypeDescription
list_aDataValueThe first list.
list_bDataValueThe second list.
resultDataValueThe resulting set union.

Size

Size of a database in magic units (bytes?).

Inherits: Query

PropertyTypeDescription
resourcexsd:stringThe resource to obtain the size of.
sizeDataValueThe size.

Slice

Extracts a contiguous subsequence from a list.

Inherits: Query

PropertyTypeDescription
endOptional(DataValue)The end index (exclusive, optional).
listDataValueThe input list to slice.
resultDataValueThe resulting sliced list.
startDataValueThe start index (0-based).

Split

Split a string.

Inherits: Query

PropertyTypeDescription
listDataValueThe result list of strings.
patternDataValueThe splitting pattern.
stringDataValueThe starting string.

Start

Start a query at the nth solution specified by 'start'. Allows resumption and paging of queries.

Inherits: Query

PropertyTypeDescription
queryQueryThe query to perform.
startxsd:nonNegativeIntegerThe numbered solution to start at.

Substring

Finds the boundaries of a substring in a string.

Inherits: Query

PropertyTypeDescription
afterDataValueThe count of characters after substring as an integer or variable.
beforeDataValueThe count of characters before substring as an integer or variable.
lengthDataValueThe length of the string as an integer or variable.
stringDataValueThe super-string as data or variable.
substringDataValueThe 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

PropertyTypeDescription
childNodeValueThe child class as a URI or variable.
parentNodeValueThe parent class as a URI or variable

Sum

Sum a list of strings.

Inherits: Query

PropertyTypeDescription
listDataValueThe list of numbers to sum.
resultDataValueThe result of the sum as a number.

Trim

Trims whitespace from 'untrimmed'.

Inherits: Query

PropertyTypeDescription
trimmedDataValueThe string to be trimmed.
untrimmedDataValueThe untrimmed string.

Triple

Specify an edge pattern in the graph.

Inherits: Query

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectValueA URI, datatype or variable which is the target or object of the graph edge.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')

TripleCount

The number of edges in a database.

Inherits: Query

PropertyTypeDescription
countDataValueThe count of edges.
resourcexsd:stringThe 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

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectValueThe current object value or the result of lookup by next.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')
nextValueThe 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

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectValueThe current object value or the result of lookup by previous.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')
previousValueThe 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

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectValueA URI, datatype or variable which is the target or object of the graph edge.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')
highValueThe exclusive upper bound of the value range.
lowValueThe 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

PropertyTypeDescription
subjectNodeValueA URI or variable which is the source or subject of the graph edge.
predicateNodeValueA URI or variable which is the edge-label or predicate of the graph edge.
objectValueA URI, datatype or variable which is the target or object of the graph edge.
graphOptional(xsd:string)An optional graph (either 'instance' or 'schema')
highValueThe exclusive upper bound of the value range.
lowValueThe 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

PropertyTypeDescription
resultValueThe resulting value after cast.
typeNodeValueThe type to which to cast.
valueValueThe value to cast.

TypeOf

TypeOf gives the type of an element.

Inherits: Query

PropertyTypeDescription
typeNodeValueThe URI which that specifies the type.
valueValueThe value of which to obtain the type.

UpdateDocument

Update a document in the graph.

Inherits: Query

PropertyTypeDescription
documentValueThe document to update. Must either have an '@id' or have a class specified key.
identifierOptional(NodeValue)An optional returned identifier specifying the documentation location.

Upper

Uppercase a string.

Inherits: Query

PropertyTypeDescription
mixedDataValueThe mixed case string.
upperDataValueThe upper case string.

Using

Select a specific collection for query.

Inherits: Query

PropertyTypeDescription
collectionxsd:stringThe resource over which to run the query.
queryQueryThe 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

PropertyTypeDescription
dateDataValueThe input date or dateTime.
weekdayDataValueThe 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

PropertyTypeDescription
dateDataValueThe input date or dateTime.
weekdayDataValueThe 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

PropertyTypeDescription
predicateOptional(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

PropertyTypeDescription
orList(PathPattern)A disjunction of path patterns.

PathPlus

The path pattern specified by 'plus' must hold one or more times in succession.

Inherits: PathPattern

PropertyTypeDescription
plusPathPatternA path patterns.

PathPredicate

A predicate to traverse.

Inherits: PathPattern

PropertyTypeDescription
predicateOptional(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

PropertyTypeDescription
sequenceList(PathPattern)A sequence of path patterns.

PathStar

The path pattern specified by 'star' may hold zero or more times in succession.

Inherits: PathPattern

PropertyTypeDescription
starPathPatternA path pattern.

PathTimes

The path pattern specified by 'times' may hold 'from' to 'to' times in succession.

Inherits: PathPattern

PropertyTypeDescription
fromxsd:nonNegativeIntegerThe number of times to start the repetition of the pattern
timesPathPatternA path pattern.
toxsd:nonNegativeIntegerThe 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

PropertyTypeDescription
dataxsd:anySimpleTypeAn xsd data type value.
variablexsd:stringA variable.

Div

Integer divide two numbers.

Inherits: ArithmeticExpression

PropertyTypeDescription
leftArithmeticExpressionFirst operand of div.
rightArithmeticExpressionSecond operand of div.

Divide

Divide two numbers.

Inherits: ArithmeticExpression

PropertyTypeDescription
leftArithmeticExpressionFirst operand of divide.
rightArithmeticExpressionSecond operand of divide.

Exp

Exponentiate a number.

Inherits: ArithmeticExpression

PropertyTypeDescription
leftArithmeticExpressionThe base.
rightArithmeticExpressionThe exponent.

Floor

Find the integral part of a number.

Inherits: ArithmeticExpression

PropertyTypeDescription
argumentArithmeticExpressionThe number to floor.

Minus

Subtract two numbers.

Inherits: ArithmeticExpression

PropertyTypeDescription
leftArithmeticExpressionFirst operand of minus.
rightArithmeticExpressionSecond operand of minus.

Plus

Add two numbers.

Inherits: ArithmeticExpression

PropertyTypeDescription
leftArithmeticExpressionFirst operand of add.
rightArithmeticExpressionSecond operand of add.

Times

Multiply two numbers.

Inherits: ArithmeticExpression

PropertyTypeDescription
leftArithmeticExpressionFirst operand of times.
rightArithmeticExpressionSecond operand of times.


Utility types

Support types used as field values in query classes — values, resources, columns, and enumerations.

Column

PropertyTypeDescription
indicatorIndicator
typeOptional(xsd:string)
variablexsd:string

DataValue

A variable or node.

Tagged Union

PropertyTypeDescription
dataxsd:anySimpleTypeAn xsd data type value.
listList(DataValue)A list of datavalues
variablexsd:stringA 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.

PropertyTypeDescription
dataSet(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.

PropertyTypeDescription
fieldxsd:stringThe field or key of a dictionary value pair
valueValueThe value of a dictionary value pair.

FormatType

Enum

Values: csv

PropertyTypeDescription
@value["csv"]

Indicator

Tagged Union

PropertyTypeDescription
indexxsd:nonNegativeInteger
namexsd: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.

PropertyTypeDescription
namexsd:stringThe name of the NamedParametricQuery to be retrieved.
parametersList(xsd:string)Variable name list for auxilliary bindings.
queryQueryThe query AST as WOQL JSON.

NamedQuery

A named query names a specific query for later retrieval and re-use.

PropertyTypeDescription
namexsd:stringThe name of the NamedQuery to be retrieved
queryQueryThe query AST as WOQL JSON

NodeValue

A variable or node.

Tagged Union

PropertyTypeDescription
nodexsd:stringA URI representing a resource.
variablexsd:stringA variable.

Order

Enum

Values: asc, desc

PropertyTypeDescription
@value["asc","desc"]

OrderTemplate

The order template, consisting of the variable and ordering direction.

PropertyTypeDescription
orderOrderAn enum either 'asc' or 'desc'.
variablexsd:stringThe variable to order.

QueryResource

Tagged Union

PropertyTypeDescription
formatFormatType
optionsOptional(xdd:json)
sourceSource

Source

Tagged Union

PropertyTypeDescription
postxsd:string
urlxsd:string

Value

A variable, node or data point.

Tagged Union

PropertyTypeDescription
dataxsd:anySimpleTypeAn xsd data type value.
dictionaryDictionaryTemplate
listList(Value)A list of datavalues
nodexsd:stringA URI representing a resource.
variablexsd:stringA variable.

Was this helpful?