作者:haiziqian_486_834 | 来源:互联网 | 2023-09-18 17:10
本文整理了Java中org.neo4j.graphdb.QueryExecutionType.queryType
方法的一些代码示例,展示了QueryExecutionType.queryType
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryExecutionType.queryType
方法的具体详情如下:
包路径:org.neo4j.graphdb.QueryExecutionType
类名称:QueryExecutionType
方法名:queryType
QueryExecutionType.queryType介绍
[英]Get the type of query this execution refers to.
[中]获取此执行引用的查询类型。
代码示例
代码示例来源:origin: neo4j/neo4j
/**
* Constructor used by the Cypher framework. End-users should not
* create an ExecutionResult directly, but instead use the result
* returned from calling {@link QueryExecutionEngine#executeQuery(String, MapValue, org.neo4j.kernel.impl.query.TransactionalContext)}.
*
* @param projection Execution result projection to use.
*/
public ExecutionResult( InternalExecutionResult projection )
{
inner = Objects.requireNonNull( projection );
//if updating query we must fetch the iterator right away in order to eagerly perform updates
if ( projection.executionType().queryType() == QueryType.WRITE )
{
innerIterator();
}
}
代码示例来源:origin: neo4j/neo4j
public QueryExecutionType type()
{
return convertToQuery ? query( type.queryType() ) : type;
}
}
代码示例来源:origin: neo4j/neo4j
@Override
public void accept( final Visitor visitor ) throws Exception
{
long start = clock.millis();
delegate.accept( row ->
{
visitor.visit( row );
return true;
} );
addRecordStreamingTime( visitor, clock.millis() - start );
QueryExecutionType qt = delegate.executionType();
visitor.addMetadata( "type", Values.stringValue( queryTypeCode( qt.queryType() ) ) );
if ( delegate.queryStatistics().containsUpdates() )
{
MapValue stats = queryStats( delegate.queryStatistics() );
visitor.addMetadata( "stats", stats );
}
if ( qt.requestedExecutionPlanDescription() )
{
ExecutionPlanDescription rootPlanTreeNode = delegate.executionPlanDescription();
String metadataFieldName = rootPlanTreeNode.hasProfilerStatistics() ? "profile" : "plan";
visitor.addMetadata( metadataFieldName, ExecutionPlanConverter.convert( rootPlanTreeNode ) );
}
Iterable notificatiOns= delegate.getNotifications();
if ( notifications.iterator().hasNext() )
{
visitor.addMetadata( "notifications", NotificationConverter.convert( notifications ) );
}
}
代码示例来源:origin: org.neo4j/neo4j-cypher
/**
* Constructor used by the Cypher framework. End-users should not
* create an ExecutionResult directly, but instead use the result
* returned from calling {@link QueryExecutionEngine#executeQuery(String, MapValue, org.neo4j.kernel.impl.query.TransactionalContext)}.
*
* @param projection Execution result projection to use.
*/
public ExecutionResult( InternalExecutionResult projection )
{
inner = Objects.requireNonNull( projection );
//if updating query we must fetch the iterator right away in order to eagerly perform updates
if ( projection.executionType().queryType() == QueryType.WRITE )
{
innerIterator();
}
}
代码示例来源:origin: org.neo4j/neo4j-bolt
@Override
public void accept( final Visitor visitor ) throws Exception
{
long start = clock.millis();
delegate.accept( row ->
{
visitor.visit( row );
return true;
} );
addRecordStreamingTime( visitor, clock.millis() - start );
QueryExecutionType qt = delegate.executionType();
visitor.addMetadata( "type", Values.stringValue( queryTypeCode( qt.queryType() ) ) );
if ( delegate.queryStatistics().containsUpdates() )
{
MapValue stats = queryStats( delegate.queryStatistics() );
visitor.addMetadata( "stats", stats );
}
if ( qt.requestedExecutionPlanDescription() )
{
ExecutionPlanDescription rootPlanTreeNode = delegate.executionPlanDescription();
String metadataFieldName = rootPlanTreeNode.hasProfilerStatistics() ? "profile" : "plan";
visitor.addMetadata( metadataFieldName, ExecutionPlanConverter.convert( rootPlanTreeNode ) );
}
Iterable notificatiOns= delegate.getNotifications();
if ( notifications.iterator().hasNext() )
{
visitor.addMetadata( "notifications", NotificationConverter.convert( notifications ) );
}
}