Search in sources :

Example 1 with QuerySubscriber

use of org.neo4j.kernel.impl.query.QuerySubscriber in project neo4j by neo4j.

the class SnapshotExecutionEngine method executeQuery.

@Override
public Result executeQuery(String query, MapValue parameters, TransactionalContext context, boolean prePopulate) throws QueryExecutionKernelException {
    QueryExecutor queryExecutor = querySubscriber -> super.executeQuery(query, parameters, context, prePopulate, querySubscriber);
    ResultSubscriber resultSubscriber = new ResultSubscriber(context);
    MaterialisedResult materialisedResult = executeWithRetries(query, context, queryExecutor);
    QueryExecution queryExecution = materialisedResult.stream(resultSubscriber);
    resultSubscriber.init(queryExecution);
    return resultSubscriber;
}
Also used : VersionContext(org.neo4j.io.pagecache.context.VersionContext) FullyParsedQuery(org.neo4j.cypher.internal.FullyParsedQuery) Result(org.neo4j.graphdb.Result) TransactionalContext(org.neo4j.kernel.impl.query.TransactionalContext) LogProvider(org.neo4j.logging.LogProvider) Config(org.neo4j.configuration.Config) QueryExecutionKernelException(org.neo4j.kernel.impl.query.QueryExecutionKernelException) GraphDatabaseQueryService(org.neo4j.kernel.GraphDatabaseQueryService) QueryExecutionMonitor(org.neo4j.kernel.impl.query.QueryExecutionMonitor) CompilerFactory(org.neo4j.cypher.internal.CompilerFactory) InputDataStream(org.neo4j.cypher.internal.runtime.InputDataStream) GraphDatabaseInternalSettings(org.neo4j.configuration.GraphDatabaseInternalSettings) QuerySubscriber(org.neo4j.kernel.impl.query.QuerySubscriber) MapValue(org.neo4j.values.virtual.MapValue) CaffeineCacheFactory(org.neo4j.cypher.internal.cache.CaffeineCacheFactory) QueryExecution(org.neo4j.kernel.impl.query.QueryExecution) QueryExecution(org.neo4j.kernel.impl.query.QueryExecution)

Aggregations

Config (org.neo4j.configuration.Config)1 GraphDatabaseInternalSettings (org.neo4j.configuration.GraphDatabaseInternalSettings)1 CompilerFactory (org.neo4j.cypher.internal.CompilerFactory)1 FullyParsedQuery (org.neo4j.cypher.internal.FullyParsedQuery)1 CaffeineCacheFactory (org.neo4j.cypher.internal.cache.CaffeineCacheFactory)1 InputDataStream (org.neo4j.cypher.internal.runtime.InputDataStream)1 Result (org.neo4j.graphdb.Result)1 VersionContext (org.neo4j.io.pagecache.context.VersionContext)1 GraphDatabaseQueryService (org.neo4j.kernel.GraphDatabaseQueryService)1 QueryExecution (org.neo4j.kernel.impl.query.QueryExecution)1 QueryExecutionKernelException (org.neo4j.kernel.impl.query.QueryExecutionKernelException)1 QueryExecutionMonitor (org.neo4j.kernel.impl.query.QueryExecutionMonitor)1 QuerySubscriber (org.neo4j.kernel.impl.query.QuerySubscriber)1 TransactionalContext (org.neo4j.kernel.impl.query.TransactionalContext)1 LogProvider (org.neo4j.logging.LogProvider)1 MapValue (org.neo4j.values.virtual.MapValue)1