public interface MatchQuery extends Query<List<Map<String,Concept>>>, Streamable<Map<String,Concept>>
The MatchQuery is a pattern-matching query. The patterns are described in a declarative fashion, forming a
subgraph, then the MatchQuery will traverse the graph in an efficient fashion to find any matching subgraphs.
Each matching subgraph will produce a map, where keys are variable names and values are concepts in the graph.
| Modifier and Type | Method and Description |
|---|---|
MatchQueryAdmin |
admin() |
<S> AggregateQuery<S> |
aggregate(Aggregate<? super Map<String,Concept>,S> aggregate)
Aggregate results of a query.
|
AskQuery |
ask() |
DeleteQuery |
delete(Collection<? extends Var> deleters) |
DeleteQuery |
delete(String... names) |
default DeleteQuery |
delete(Var... deleters) |
MatchQuery |
distinct()
remove any duplicate results from the query
|
default List<Map<String,Concept>> |
execute() |
java.util.stream.Stream<Concept> |
get(String name) |
InsertQuery |
insert(Collection<? extends Var> vars) |
default InsertQuery |
insert(Var... vars) |
MatchQuery |
limit(long limit) |
MatchQuery |
offset(long offset) |
default MatchQuery |
orderBy(String varName)
Order the results by degree in ascending order
|
MatchQuery |
orderBy(String varName,
boolean asc)
Order the results by degree
|
MatchQuery |
select(Set<String> names) |
default MatchQuery |
select(String... names) |
MatchQuery |
withGraph(MindmapsGraph graph) |
isReadOnly, resultsStringiterator, parallelStream, streamforEach, spliteratordefault MatchQuery select(String... names)
names - an array of variable names to selectMatchQuery select(Set<String> names)
names - a set of variable names to selectjava.util.stream.Stream<Concept> get(String name)
name - a variable name to getAskQuery ask()
default InsertQuery insert(Var... vars)
vars - an array of variables to insert for each result of this match queryInsertQuery insert(Collection<? extends Var> vars)
vars - a collection of variables to insert for each result of this match queryDeleteQuery delete(String... names)
names - an array of variable names to delete for each result of this match querydefault DeleteQuery delete(Var... deleters)
deleters - an array of variables stating what properties to delete for each result of this match queryDeleteQuery delete(Collection<? extends Var> deleters)
deleters - a collection of variables stating what properties to delete for each result of this match querydefault MatchQuery orderBy(String varName)
varName - the variable name to order the results byMatchQuery orderBy(String varName, boolean asc)
varName - the variable name to order the results byasc - whether to use ascending orderMatchQuery withGraph(MindmapsGraph graph)
MatchQuery limit(long limit)
limit - the maximum number of results the query should returnMatchQuery offset(long offset)
offset - the number of results to skipMatchQuery distinct()
<S> AggregateQuery<S> aggregate(Aggregate<? super Map<String,Concept>,S> aggregate)
S - the type of the aggregate resultaggregate - the aggregate operation to applyMatchQueryAdmin admin()
Copyright © 2016. All rights reserved.