License: Apache Version 2
The WOQL object is a wrapper around the WOQLQuery object Syntactic sugar to allow writing WOQL.triple()... instead of new WOQLQuery().triple() Every function matches one of the public api functions of the woql query object
WOQL.using(refPath, [subquery]) ⇒ WOQLQuery
Query running against any specific commit Id
Example
WOQL.comment(comment, [subquery]) ⇒ WOQLQuery
Adds a text comment to a query - can also be used to wrap any part of a query to turn it off
WOQL.select(varNames) ⇒ WOQLQuery
Example
WOQL.distinct(varNames) ⇒ WOQLQuery
Filter the query to return only results that are distinct in the given variables
WOQL.and(...subqueries) ⇒ WOQLQuery
Logical conjunction of the contained queries - all queries must match or the entire clause fails
Returns: WOQLQuery
- - A WOQLQuery object containing the conjunction of queries
Example
WOQL.read_object()
Deprecated
Use read_document instead.
WOQL.read_document(IRI, output) ⇒ object
Read a node identified by an IRI as a JSON-LD document
Returns: object
- WOQLQuery
Example
WOQL.insert_document(docjson, [IRI]) ⇒ object
Insert a document in the graph.
Returns: object
- WOQLQuery
Example
WOQL.update_document(docjson, [IRI]) ⇒ object
Update a document identified by an IRI
Returns: object
- WOQLQuery
WOQL.delete_document(IRI) ⇒ object
Delete a document from the graph.
Returns: object
- WOQLQuery
WOQL.or(...subqueries) ⇒ WOQLQuery
Creates a logical OR of the arguments
Returns: WOQLQuery
- - A WOQLQuery object containing the logical Or of the subqueries
Example
WOQL.from(graphRef-, [query]) ⇒ WOQLQuery
Specifies the database URL that will be the default database for the enclosed query
Returns: WOQLQuery
- A WOQLQuery object containing the from expression
WOQL.into(graphRef-, [subquery]) ⇒ WOQLQuery
Specifies the graph resource to write the contained query into
Returns: WOQLQuery
- A WOQLQuery which will be written into the graph in question
Example
WOQL.triple(subject, predicate, object) ⇒ WOQLQuery
Creates a triple pattern matching rule for the triple [S, P, O] (Subject, Predicate, Object)
WOQL.added_triple(subject, predicate, object) ⇒ WOQLQuery
Creates a triple pattern matching rule for the triple [S, P, O] (Subject, Predicate, Object) added in the current layer
WOQL.removed_triple(subject, predicate, object) ⇒ WOQLQuery
Creates a triple pattern matching rule for the triple [S, P, O] (Subject, Predicate, Object) added in the current commit
WOQL.quad(subject, predicate, object, graphRef) ⇒ WOQLQuery
Creates a pattern matching rule for the quad [S, P, O, G] (Subject, Predicate, Object, Graph)
WOQL.added_quad(subject, predicate, object, graphRef-) ⇒ WOQLQuery
Creates a pattern matching rule for the quad [S, P, O, G] (Subject, Predicate, Object, Graph) removed from the current commit
WOQL.removed_quad(subject, predicate, object, graphRef-) ⇒ WOQLQuery
Creates a pattern matching rule for the quad [S, P, O, G] (Subject, Predicate, Object, Graph) removed from the current commit
WOQL.sub(classA, classB) ⇒ boolean
Returns true if ClassA subsumes ClassB, according to the current DB schema
Returns: boolean
- WOQLQuery
WOQL.eq(varName, varValue) ⇒ WOQLQuery
Matches if a is equal to b
WOQL.substr(string, before, [length], [after], [substring]) ⇒ WOQLQuery
Substring
WOQL.get(asvars, queryResource) ⇒ WOQLQuery
Deprecated
Use the document inteface to import documents
Returns: WOQLQuery
- A WOQLQuery which contains the get expression
Example
WOQL.put(varsToExp, query, fileResource) ⇒ WOQLQuery
Deprecated
Use the document inteface to import documents
Returns: WOQLQuery
- A WOQLQuery which contains the put expression
Put: Outputs the results of a query to a file
Example
WOQL.as(source, target, [type]) ⇒ WOQLQuery
Imports the value identified by Source to a Target variable
Example
WOQL.remote(remoteObj, [formatObj]) ⇒ WOQLQuery
Identifies a remote resource by URL and specifies the format of the resource through the options
Returns: WOQLQuery
- A WOQLQuery which contains the remote resource identifier
Example
WOQL.post(url, [formatObj], [source]) ⇒ WOQLQuery
Identifies a resource as a local path on the client, to be sent to the server through a HTTP POST request, with the format defined through the options
Returns: WOQLQuery
- A WOQLQuery which contains the Post resource identifier
Example
WOQL.delete_triple(subject, predicate, object) ⇒ WOQLQuery
Deletes a single triple from the default graph of the database
Returns: WOQLQuery
- - A WOQLQuery which contains the Triple Deletion statement
Example
WOQL.delete_quad(subject, predicate, object, graphRef) ⇒ WOQLQuery
Deletes a single triple from the graph [Subject, Predicate, Object, Graph]
Returns: WOQLQuery
- - A WOQLQuery which contains the Delete Quad Statement
Example
WOQL.add_triple(subject, predicate, object) ⇒ WOQLQuery
Adds triples according to the the pattern [subject,predicate,object]
WOQL.add_quad(subject, predicate, object, graphRef-) ⇒ WOQLQuery
Adds quads according to the pattern [S,P,O,G]
WOQL.trim(inputStr, resultVarName) ⇒ WOQLQuery
Remove whitespace from both sides of a string:
Returns: WOQLQuery
- A WOQLQuery which contains the Trim pattern matching expression
Example
WOQL.evaluate(arithExp, resultVarName) ⇒ WOQLQuery
Evaluates the passed arithmetic expression and generates or matches the result value
Returns: WOQLQuery
- A WOQLQuery which contains the Arithmetic function
Example
WOQL.eval(arithExp, resultVarName) ⇒ WOQLQuery
Evaluates the passed arithmetic expression and generates or matches the result value
Returns: WOQLQuery
- WOQLQuery
WOQL.plus(...args) ⇒ WOQLQuery
Adds the numbers together
Returns: WOQLQuery
- A WOQLQuery which contains the addition expression
Example
WOQL.minus(...args) ⇒ WOQLQuery
Subtracts Numbers N1..Nn
Returns: WOQLQuery
- A WOQLQuery which contains the subtraction expression
Example
WOQL.times(...args) ⇒ WOQLQuery
Multiplies numbers N1...Nn together
Returns: WOQLQuery
- A WOQLQuery which contains the multiplication expression
Example
WOQL.divide(...args) ⇒ WOQLQuery
Divides numbers N1...Nn by each other left, to right precedence
Returns: WOQLQuery
- A WOQLQuery which contains the division expression let [result] = vars("result") evaluate(divide(times(10, minus(2.1, plus(0.2, 1))), 10), result) //result contains 0.9000000000000001
WOQL.div(...args) ⇒ WOQLQuery
Division - integer division - args are divided left to right
Returns: WOQLQuery
- A WOQLQuery which contains the division expression
Example
WOQL.exp(varNum, expNum) ⇒ WOQLQuery
Exponent - raises varNum01 to the power of varNum02
Returns: WOQLQuery
- A WOQLQuery which contains the exponent expression
Example
WOQL.floor(varNum) ⇒ WOQLQuery
Generates the nearest lower integer to the passed number
Returns: WOQLQuery
- A WOQLQuery which contains the floor expression
Example
WOQL.isa(instanceIRI, classId) ⇒ WOQLQuery
Tests whether a given instance IRI has type Class, according to the current state of the DB
Returns: WOQLQuery
- A WOQLQuery object containing the type test
Example
WOQL.like(stringA, stringB, distance) ⇒ WOQLQuery
Generates a string Leverstein distance measure between stringA and stringB
Returns: WOQLQuery
- A WOQLQuery which contains the Like pattern matching expression
Example
WOQL.less(varNum01, varNum02) ⇒ WOQLQuery
Compares the value of v1 against v2 and returns true if v1 is less than v2
Returns: WOQLQuery
- A WOQLQuery which contains the comparison expression
Example
WOQL.greater(varNum01, varNum02) ⇒ WOQLQuery
Compares the value of v1 against v2 and returns true if v1 is greater than v2
Returns: WOQLQuery
- A WOQLQuery which contains the comparison expression
Example
WOQL.opt([subquery]) ⇒ WOQLQuery
Specifies that the Subquery is optional - if it does not match the query will not fail
Returns: WOQLQuery
- A WOQLQuery object containing the optional sub Query
Example
WOQL.unique(prefix, inputVarList, resultVarName) ⇒ WOQLQuery
Generate a new IRI from the prefix and a hash of the variables which will be unique for any given combination of variables
Returns: WOQLQuery
- A WOQLQuery object containing the unique ID generating function
Example
WOQL.idgen(prefix, inputVarList, resultVarName) ⇒ WOQLQuery
Generate a new IRI from the prefix and concatention of the variables
Returns: WOQLQuery
- A WOQLQuery object containing the ID generating function
Example
WOQL.upper(inputVarName, resultVarName) ⇒ WOQLQuery
Changes a string to upper-case
Returns: WOQLQuery
- A WOQLQuery which contains the Upper case pattern matching expression
Example
WOQL.lower(inputVarName, resultVarName) ⇒ WOQLQuery
Changes a string to lower-case
Returns: WOQLQuery
- A WOQLQuery which contains the Lower case pattern matching expression
Example
WOQL.pad(inputVarName, pad, len, resultVarName) ⇒ WOQLQuery
Pads out the string input to be exactly len long by appending the pad character pad to form output
Returns: WOQLQuery
- A WOQLQuery which contains the Pad pattern matching expression
Example
WOQL.split(inputVarName, separator, resultVarName) ⇒ WOQLQuery
Splits a string (Input) into a list strings (Output) by removing separator
Returns: WOQLQuery
- A WOQLQuery which contains the Split pattern matching expression
Example
WOQL.member(element, list) ⇒ WOQLQuery
Matches if List includes Element
Returns: WOQLQuery
- A WOQLQuery which contains the List inclusion pattern matching expression
Example
WOQL.concat(varList, resultVarName) ⇒ WOQLQuery
takes a variable number of string arguments and concatenates them into a single string
Returns: WOQLQuery
- A WOQLQuery which contains the Concatenation pattern matching expression
Example
WOQL.join(varList, glue, resultVarName) ⇒ WOQLQuery
Joins a list variable together (Input) into a string variable (Output) by glueing the strings together with Glue
Returns: WOQLQuery
- A WOQLQuery which contains the Join pattern matching expression
Example
WOQL.sum(subquery, total) ⇒ WOQLQuery
computes the sum of the List of values passed. In contrast to other arithmetic functions, sum self-evaluates - it does not have to be passed to evaluate()
Returns: WOQLQuery
- - A WOQLQuery which contains the Sum expression
Example
WOQL.start(start, [subquery]) ⇒ WOQLQuery
Specifies an offset position in the results to start listing results from
Returns: WOQLQuery
- A WOQLQuery whose results will be returned starting from the specified offset
Example
WOQL.limit(limit, [subquery]) ⇒ WOQLQuery
Specifies a maximum number of results that will be returned from the subquery
Returns: WOQLQuery
- A WOQLQuery whose results will be returned starting from the specified offset
Example
WOQL.re(pattern, inputVarName, resultVarList) ⇒ WOQLQuery
Matches the regular expression defined in Patern against the Test string, to produce the matched patterns in Matches
Returns: WOQLQuery
- A WOQLQuery which contains the Regular Expression pattern matching expression
Example
WOQL.length(inputVarList, resultVarName) ⇒ WOQLQuery
Calculates the length of the list in va and stores it in vb
Returns: WOQLQuery
- A WOQLQuery which contains the Length pattern matching expression
Example
WOQL.not([subquery]) ⇒ WOQLQuery
Logical negation of the contained subquery - if the subquery matches, the query will fail to match
Returns: WOQLQuery
- A WOQLQuery object containing the negated sub Query
Example
WOQL.once([subquery]) ⇒ WOQLQuery
Results in one solution of the subqueries
Returns: WOQLQuery
- A WOQLQuery object containing the once sub Query
WOQL.immediately([subquery]) ⇒ WOQLQuery
Runs the query without backtracking on side-effects
Returns: WOQLQuery
- A WOQLQuery object containing the immediately sub Query
WOQL.count(countVarName, [subquery]) ⇒ WOQLQuery
Creates a count of the results of the query
Returns: WOQLQuery
- A WOQLQuery object containing the count sub Query
Example
WOQL.typecast(varName, varType, resultVarName) ⇒ WOQLQuery
Casts the value of Input to a new value of type Type and stores the result in CastVar
Returns: WOQLQuery
- A WOQLQuery which contains the casting expression
Example
WOQL.order_by(varNames) ⇒ WOQLQuery
Orders the results of the contained subquery by a precedence list of variables
Returns: WOQLQuery
- A WOQLQuery which contains the ordering expression
Example
WOQL.group_by(varList, patternVars, resultVarName, [subquery]) ⇒ WOQLQuery
Groups the results of the contained subquery on the basis of identical values for Groupvars, extracts the patterns defined in PatternVars and stores the results in GroupedVar
Returns: WOQLQuery
- A WOQLQuery which contains the grouping expression
Example
WOQL.true() ⇒ WOQLQuery
A function that always matches, always returns true
Returns: WOQLQuery
- A WOQLQuery object containing the true value that will match any pattern
Example
WOQL.path(subject, pattern, object, [resultVarName]) ⇒ WOQLQuery
Performs a path regular expression match on the graph
Returns: WOQLQuery
- - A WOQLQuery which contains the path regular expression matching expression
Example
WOQL.size(resourceId, resultVarName)
Calculates the size in bytes of the contents of the resource identified in ResourceID
Example
WOQL.triple_count(resourceId, tripleCount) ⇒ WOQLQuery
Calculates the number of triples of the contents of the resource identified in ResourceID
Returns: WOQLQuery
- A WOQLQuery which contains the size expression
Example
WOQL.type_of(elementId, elementType) ⇒ WOQLQuery
Returns true if 'elementId' is of type 'elementType', according to the current DB schema
Returns: WOQLQuery
- A WOQLQuery object containing the type_of pattern matching rule
WOQL.star([graph], [subject], [predicate], [object]) ⇒ WOQLQuery
Generates a query that by default matches all triples in a graph identified by "graph" or in all the current terminusDB's graph
Returns: WOQLQuery
- A WOQLQuery which contains the pattern matching expression
Example
WOQL.all([subject], [predicate], [object], [graphRef]) ⇒ WOQLQuery
Generates a query that by default matches all triples in a graph - identical to star() except for order of arguments
Returns: WOQLQuery
- - A WOQLQuery which contains the pattern matching expression all("mydoc") //will return every triple in the instance/main graph that has "doc:mydoc" as its subject
WOQL.node(nodeid, [chainType]) ⇒ WOQLQuery
Specifies the identity of a node that can then be used in subsequent builder functions. Note that node() requires subsequent chained functions to complete the triples / quads that it produces - by itself it only generates the subject.
Returns: WOQLQuery
- - A WOQLQuery which contains the partial Node pattern matching expression
Example
WOQL.insert(classId, classType, [graphRef]) ⇒ WOQLQuery
Inserts a single triple into the database declaring the Node to have type Type, optionally into the specified graph
Returns: WOQLQuery
- A WOQLQuery which contains the insert expression
Example
WOQL.graph([graphRef]) ⇒ WOQLQuery
Sets the graph resource ID that will be used for subsequent chained function calls
Returns: WOQLQuery
- A WOQLQuery which contains the partial Graph pattern matching expression
Example
WOQL.nuke([graphRef]) ⇒ WOQLQuery
Deletes all triples in the passed graph (defaults to instance/main)
Returns: WOQLQuery
- - A WOQLQuery which contains the deletion expression
Example
WOQL.query() ⇒ WOQLQuery
Generates an empty WOQLQuery object
Example
WOQL.json([JSON_LD]) ⇒ WOQLQuery
| object
Generates a WOQLQuery object from the passed WOQL JSON - if an argument is passed, the query object is created from it, if none is passed, the current state is returned as a JSON-LD
Returns: WOQLQuery
| object
- either a JSON-LD or a WOQLQuery object
json version of query for passing to api
WOQL.lib() ⇒ WOQLQuery
get the predefined library query WOQLLibrary
Returns: WOQLQuery
- WOQLQuery object
Example
WOQL.string(val) ⇒ object
Generates explicitly a JSON-LD string literal from the input
Returns: object
- - A JSON-LD string literal
Example
WOQL.literal(val, type) ⇒ object
Generates explicitly a JSON-LD string literal from the input
Returns: object
- - A JSON-LD literal
Example
WOQL.date(date) ⇒ object
Generates explicitly a JSON-LD literal date from the imput
Returns: object
- - A JSON-LD literal date
Example
WOQL.datetime(datetime) ⇒ object
Generates explicitly a JSON-LD literal datetime from the imput
Returns: object
- - A JSON-LD literal datetime
Example
WOQL.boolean(bool) ⇒ object
Generates explicitly a JSON-LD literal boolean from the input
Returns: object
- - A JSON-LD literal boolean
Example
WOQL.iri(val) ⇒ object
Explicitly sets a value to be an IRI - avoiding automatic type marshalling
Returns: object
- - A JSON-LD IRI value
WOQL.vars(...varNames) ⇒ array.<Var>
Generates javascript variables for use as WOQL variables within a query
Returns: array.<Var>
- an array of javascript variables which can be dereferenced using the array destructuring operation
Example
WOQL.doc(object) ⇒ object
Produces an encoded form of a document that can be used by a WOQL operation such as WOQL.insert_document
.
Returns: object
- The encoded document
Example
WOQL.client(client) ⇒ WOQLClient
Gets/Sets woqlClient
WOQL.Vars(...varNames) ⇒ object.<Var>
Example
WOQL.emerge(auto_eval)
query module allow you to use WOQL words as top level functions
WOQL.update_triple(subject, predicate, newObjValue, oldObjValue) ⇒ WOQLQuery
Update a pattern matching rule for the triple (Subject, Predicate, oldObjValue) with the new one (Subject, Predicate, newObjValue)
Returns: WOQLQuery
- A WOQLQuery which contains the a Update Triple Statement
WOQL.update_quad(subject, predicate, newObject, graphRef) ⇒ WOQLQuery
Update a pattern matching rule for the quad [S, P, O, G] (Subject, Predicate, Object, Graph)
Returns: WOQLQuery
- A WOQLQuery which contains the a Update Quad Statement
WOQL.value(subject, predicate, objValue) ⇒ WOQLQuery
Creates a pattern matching rule for a triple [Subject, Predicate, Object] add extra information about the type of the value object
Returns: WOQLQuery
- A WOQLQuery which contains the a quad or a triple Statement
WOQL.link(subject, predicate, object) ⇒ WOQLQuery
Creates a pattern matching rule for a triple [Subject, Predicate, Object]
Returns: WOQLQuery
- A WOQLQuery which contains the a quad or a triple Statement
WOQL.dot(document, field, value) ⇒ WOQLQuery
Extract the value of a key in a bound document.
Returns: WOQLQuery
- A WOQLQuery which contains the a dot Statement
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type |
---|---|
Param | Type | Description |
---|---|---|
Param | Type |
---|---|
Param | Type |
---|---|
Param | Type |
---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
Param | Type | Description |
---|---|---|
refPath
string
path to specific reference Id or commit Id
[subquery]
WOQLQuery
subquery for the specific commit point
comment
string
text comment
[subquery]
WOQLQuery
query that is "commented out"
varNames
string
| Var
only these variables are returned
varNames
string
| Var
these variables are guaranteed to be unique as a tuple
...subqueries
WOQLQuery
A list of one or more woql queries to execute as a conjunction
IRI
string
The document id or a variable to read
output
string
Variable which will be bound to the document.
docjson
object
The document to insert. Must either have an '@id' or have a class specified key.
[IRI]
string
An optional identifier specifying the document location.
docjson
object
The document to update. Must either have an '@id' or have a class specified key.
[IRI]
string
An optional identifier specifying the document location.
IRI
string
The document id or a variable
...subqueries
WOQLQuery
A list of one or more woql queries to execute as alternatives
graphRef-
typedef.GraphRef
A valid graph resource identifier string
[query]
WOQLQuery
The query
graphRef-
typedef.GraphRef
A valid graph resource identifier string
[subquery]
WOQLQuery
The query which will be written into the graph
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
object
string
| Var
The IRI of a node or a variable, or a literal
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
object
string
| Var
The IRI of a node or a variable, or a literal
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
object
string
| Var
The IRI of a node or a variable, or a literal
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
object
string
| Var
The IRI of a node or a variable, or a literal
graphRef
typedef.GraphRef
A valid graph resource identifier string
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
object
string
| Var
The IRI of a node or a variable, or a literal
graphRef-
typedef.GraphRef
A valid graph resource identifier string
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
object
string
| Var
The IRI of a node or a variable, or a literal
graphRef-
typedef.GraphRef
A valid graph resource identifier string
classA
string
ClassA
classB
string
ClassB
varName
string
| Var
literal, variable or id
varValue
string
| Var
literal, variable or id
string
string
| Var
String or variable
before
number
| Var
integer or variable (characters from start to begin)
[length]
number
| Var
integer or variable (length of substring)
[after]
number
| Var
integer or variable (number of characters after substring)
[substring]
string
| Var
String or variable
asvars
Vars
| array.<Var>
an array of AsVar variable mappings (see as for format below)
queryResource
WOQLQuery
an external resource (remote, file, post) to query
varsToExp
Vars
| array.<Var>
an array of AsVar variable mappings (see as for format below)
query
WOQLQuery
The query which will be executed to produce the results
fileResource
string
an file resource local to the server
source
string
| number
| Var
Source
target
string
| Var
Target
[type]
string
type to cast value to string
remoteObj
object
The URL at which the remote resource can be accessed
[formatObj]
typedef.DataFormatObj
The format of the resource data {}
url
string
The Path on the server at which the file resource can be accessed
[formatObj]
typedef.DataFormatObj
imput options, optional
[source]
string
It defines the source of the file, it can be 'url','post'
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
object
string
| Var
The IRI of a node or a variable, or a literal
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
object
string
| Var
The IRI of a node or a variable, or a literal
graphRef
typedef.GraphRef
A valid graph resource identifier string
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
object
string
| Var
The IRI of a node or a variable, or a literal
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
object
string
| Var
The IRI of a node or a variable, or a literal
graphRef-
typedef.GraphRef
A valid graph resource identifier string
inputStr
string
| Var
A string or variable containing the untrimmed version of the string
resultVarName
string
| Var
A string or variable containing the trimmed version of the string
arithExp
object
| WOQLQuery
| string
A WOQL query containing a valid WOQL Arithmetic Expression, which is evaluated by the function
resultVarName
string
| number
| Var
Either a variable, in which the result of the expression will be stored, or a numeric literal which will be used as a test of result of the evaluated expression
arithExp
object
| WOQLQuery
| string
query or JSON-LD representing the query
resultVarName
string
| Var
output variable
...args
string
| number
| Var
a variable or numeric containing the values to add
...args
string
| number
| Var
variable or numeric containing the value that will be subtracted from
...args
string
| number
| Var
a variable or numeric containing the value
...args
string
| number
| Var
numbers to tbe divided
...args
string
| number
| Var
numbers for division
varNum
string
| number
| Var
a variable or numeric containing the number to be raised to the power of the second number
expNum
number
a variable or numeric containing the exponent
varNum
string
| number
| Var
Variable or numeric containing the number to be floored
instanceIRI
string
| Var
A string IRI or a variable that identify the class instance
classId
string
| Var
A Class IRI or a variable
stringA
string
| Var
string literal or variable representing a string to be compared
stringB
string
| Var
string literal or variable representing the other string to be compared
distance
number
| string
| Var
variable representing the distance between the variables
varNum01
string
| number
| Var
a variable or numeric containing the number to be compared
varNum02
string
| number
| Var
a variable or numeric containing the second comporator
varNum01
string
| number
| Var
a variable or numeric containing the number to be compared
varNum02
string
| number
| Var
a variable or numeric containing the second comporator
[subquery]
WOQLQuery
A subquery which will be optionally matched
prefix
string
A prefix for the IRI - typically formed of the doc prefix and the classtype of the entity (“doc:Person”)
inputVarList
array
| string
| Var
An array of variables and / or strings from which the unique hash will be generated
resultVarName
string
| Var
Variable in which the unique ID is stored
prefix
string
A prefix for the IRI - typically formed of the doc prefix and the classtype of the entity (“doc:Person”)
inputVarList
array
| string
| Var
An array of variables and / or strings from which the unique hash will be generated
resultVarName
string
| Var
Variable in which the unique ID is stored
inputVarName
string
| Var
string or variable representing the uncapitalized string
resultVarName
string
| Var
variable that stores the capitalized string output
inputVarName
string
| Var
string or variable representing the non-lowercased string
resultVarName
string
| Var
variable that stores the lowercased string output
inputVarName
string
| Var
The input string or variable in unpadded state
pad
string
| Var
The characters to use to pad the string or a variable representing them
len
number
| string
| Var
The variable or integer value representing the length of the output string
resultVarName
string
| Var
stores output
inputVarName
string
| Var
A string or variable representing the unsplit string
separator
string
| Var
A string or variable containing a sequence of charatcters to use as a separator
resultVarName
string
| Var
variable that stores output list
element
string
| object
| Var
Either a variable, IRI or any simple datatype
list
string
| array
| Var
List ([string, literal] or string*) Either a variable representing a list or a list of variables or literals
varList
array
| string
| Var
a variable representing a list or a list of variables or strings - variables can be embedded in the string if they do not contain spaces
resultVarName
string
| Var
A variable or string containing the output string
varList
string
| array
| Var
a variable representing a list or a list of strings and / or variables
glue
string
| Var
A variable (v:glue) or (glue) string representing the characters to put in between the joined strings in input
resultVarName
string
| Var
A variable or string containing the output string
subquery
WOQLQuery
a subquery or ([string or numeric]) - a list variable, or a list of variables or numeric literals
total
string
| Var
the variable name with the sum result of the values in List
start
number
| string
| Var
A variable that refers to an interger or an integer literal
[subquery]
WOQLQuery
WOQL Query object, you can pass a subquery as an argument or a chained query
limit
number
| string
A variable that refers to an non-negative integer or a non-negative integer
[subquery]
WOQLQuery
A subquery whose results will be limited
pattern
string
string or variable using normal PCRE regular expression syntax with the exception that special characters have to be escaped twice (to enable transport in JSONLD)
inputVarName
string
| Var
string or variable containing the string to be tested for patterns with the regex
resultVarList
string
| array
| object
| Var
variable representing the list of matches or a list of strings or variables
inputVarList
string
| array
Either a variable representing a list or a list of variables or literals
resultVarName
string
| Var
A variable in which the length of the list is stored or the length of the list as a non-negative integer
[subquery]
string
| WOQLQuery
A subquery which will be negated
[subquery]
string
| WOQLQuery
WOQL Query objects
[subquery]
string
| WOQLQuery
WOQL Query objects
countVarName
string
| number
| Var
variable or integer count
[subquery]
WOQLQuery
varName
string
| number
| object
| Var
Either a single variable or a literal of any basic type
varType
string
| Var
Either a variable or a basic datatype (xsd / xdd)
resultVarName
string
| Var
save the return variable
varNames
string
| Var
| array
A sequence of variables, by which to order the results, each optionally followed by either “asc” or “desc” to represent order as a list, by default it will sort the variable in ascending order
varList
array
| string
| Var
Either a single variable or an array of variables
patternVars
array
| string
| Var
Either a single variable or an array of variables
resultVarName
string
| Var
output variable name
[subquery]
WOQLQuery
The query whose results will be grouped
subject
string
| Var
An IRI or variable that refers to an IRI representing the subject, i.e. the starting point of the path
pattern
string
(string) - A path regular expression describing a pattern through multiple edges of the graph (see: https://terminusdb.com/docs/index/terminusx-db/how-to-guides/path-queries)
object
string
| Var
An IRI or variable that refers to an IRI representing the object, i.e. ending point of the path
[resultVarName]
string
| Var
A variable in which the actual paths traversed will be stored
resourceId
string
| Var
A valid resource identifier string (can refer to any graph / branch / commit / db)
resultVarName
string
| Var
The variable name
resourceId
string
| Var
A valid resource identifier string (can refer to any graph / branch / commit / db)
tripleCount
string
| number
| Var
An integer literal with the size in bytes or a variable containing that integer
elementId
string
| Var
the id of a schema graph element
elementType
string
| Var
the element type
[graph]
string
| boolean
false or the resource identifier of a graph possible value are schema/{main - myschema - *}
[subject]
string
| Var
The IRI of a triple’s subject or a variable, default value "v:Subject"
[predicate]
string
| Var
The IRI of a property or a variable, default value "v:Predicate"
[object]
string
| Var
The IRI of a node or a variable, or a literal, default value "v:Object"
[subject]
string
| Var
The IRI of a triple’s subject or a variable
[predicate]
string
| Var
The IRI of a property or a variable
[object]
string
| Var
The IRI of a node or a variable, or a literal
[graphRef]
typedef.GraphRef
the resource identifier of a graph possible value are schema/{main - myschema - *}
nodeid
string
| Var
The IRI of a node or a variable containing an IRI which will be the subject of the builder functions
[chainType]
typedef.FuntionType
Optional type of builder function to build (default is triple)
classId
string
| Var
IRI string or variable containing the IRI of the node to be inserted
classType
string
| Var
IRI string or variable containing the IRI of the type of the node (class/document name)
[graphRef]
typedef.GraphRef
Optional Graph resource identifier
[graphRef]
typedef.GraphRef
Resource String identifying the graph which will be used for subsequent chained schema calls
[graphRef]
typedef.GraphRef
Resource String identifying the graph from which all triples will be removed
[JSON_LD]
object
JSON-LD woql document encoding a query
val
string
| boolean
| number
any primitive literal type
val
string
any literal type
type
string
an xsd or xdd type
date
string
any date format string (YYYY-MM-DD)
datetime
string
any datetime format string (YYYY-MM-DDThh-mm-ssZ)
bool
boolean
true
val
string
string which will be treated as an IRI
...varNames
string
object
object
Document to encode
client
WOQLClient
...varNames
string
auto_eval
*
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
newObjValue
string
| Var
The value to update or a literal
oldObjValue
string
| Var
The old value of the object
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
newObject
string
| Var
The value to update or a literal
graphRef
typedef.GraphRef
A valid graph resource identifier string
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
objValue
string
| number
| boolean
| Var
an specific value
subject
string
| Var
The IRI of a triple’s subject or a variable
predicate
string
| Var
The IRI of a property or a variable
object
string
| Var
The IRI of a node or a variable, or a literal
document
string
| Var
Document which is being accessed.
field
string
| Var
The field from which the document which is being accessed.
value
string
| Var
The value for the document and field.