public final class QueryExecutionType extends Object
In Cypher there are three different modes of execution:
Instances of this class contain the required information to be able to tell these different execution modes apart. It also contains information about what effects the query could have, and whether it could yield any results, in form of theQueryType enum.
Queries executed with the PROFILE directive can have side effects and produce results in the same way as a
normally executed method. The difference being that the user has expressed an interest in seeing the plan used to
execute the query, and that this plan will (after execution completes) be annotated with
profiling information from the execution of the query.
Queries executed with the EXPLAIN directive never have any side effects, nor do they ever yield any rows in
the results, the sole purpose of this mode of execution is to
get a description of the plan that would be executed
if/when the query is executed normally (or under PROFILE).
| Modifier and Type | Class and Description |
|---|---|
static class |
QueryExecutionType.QueryType
Signifies what type of query an
QueryExecutionType executes. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canContainResults()
Signifies that the execution of the query could produce a result.
|
boolean |
canUpdateData()
Signifies that the execution of the query could perform changes to the data.
|
boolean |
canUpdateSchema()
Signifies that the execution of the query updates the schema.
|
static QueryExecutionType |
explained(QueryExecutionType.QueryType type)
Get the
QueryExecutionType that signifies explaining the plan of a query of the supplied type. |
boolean |
isExplained()
Signifies that the query was executed with the
EXPLAIN directive. |
boolean |
isProfiled()
Signifies whether results from this execution
contains profiling information.
|
static QueryExecutionType |
profiled(QueryExecutionType.QueryType type)
Get the
QueryExecutionType that signifies profiled execution of a query of the supplied type. |
static QueryExecutionType |
query(QueryExecutionType.QueryType type)
Get the
QueryExecutionType that signifies normal execution of a query of the supplied type. |
QueryExecutionType.QueryType |
queryType()
Get the type of query this execution refers to.
|
boolean |
requestedExecutionPlanDescription()
Signifies whether the supplied query contained a directive that asked for a
description of the execution plan.
|
String |
toString() |
public static QueryExecutionType query(QueryExecutionType.QueryType type)
QueryExecutionType that signifies normal execution of a query of the supplied type.type - the type of query executed.QueryExecutionType.QueryType.public static QueryExecutionType profiled(QueryExecutionType.QueryType type)
QueryExecutionType that signifies profiled execution of a query of the supplied type.type - the type of query executed.QueryExecutionType.QueryType.public static QueryExecutionType explained(QueryExecutionType.QueryType type)
QueryExecutionType that signifies explaining the plan of a query of the supplied type.type - the type of query executed.QueryExecutionType.QueryType.public QueryExecutionType.QueryType queryType()
public boolean isProfiled()
true for queries executed with the
PROFILE directive.true if the results from this execution would contain profiling information.public boolean requestedExecutionPlanDescription()
true for queries executed with either the
EXPLAIN or PROFILE directives.true if a description of the plan should be presented to the user.public boolean isExplained()
EXPLAIN directive.true if the query was executed using the EXPLAIN directive.public boolean canContainResults()
true if the execution would yield rows in the result set.public boolean canUpdateData()
Result.getQueryStatistics().containsUpdates() signifies whether the query actually performed any updates.true if the execution could perform changes to data.public boolean canUpdateSchema()
true if the execution updates the schema.Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.