use of org.neo4j.cypher.internal.compiler.CypherPlannerConfiguration in project neo4j by neo4j.
the class CommunityCypherEngineProvider method createEngine.
@Override
protected QueryExecutionEngine createEngine(Dependencies deps, GraphDatabaseAPI graphAPI, boolean isSystemDatabase, SPI spi) {
GraphDatabaseCypherService queryService = new GraphDatabaseCypherService(graphAPI);
deps.satisfyDependency(queryService);
CypherConfiguration cypherConfig = CypherConfiguration.fromConfig(spi.config());
CypherPlannerConfiguration plannerConfig = CypherPlannerConfiguration.fromCypherConfiguration(cypherConfig, spi.config(), isSystemDatabase);
CypherRuntimeConfiguration runtimeConfig = CypherRuntimeConfiguration.fromCypherConfiguration(cypherConfig);
CompilerFactory compilerFactory = makeCompilerFactory(queryService, spi, plannerConfig, runtimeConfig);
CaffeineCacheFactory cacheFactory = makeCacheFactory(spi);
if (isSystemDatabase) {
CypherPlannerConfiguration innerPlannerConfig = CypherPlannerConfiguration.fromCypherConfiguration(cypherConfig, spi.config(), false);
CompilerFactory innerCompilerFactory = makeCompilerFactory(queryService, spi, innerPlannerConfig, runtimeConfig);
return new SystemExecutionEngine(queryService, cacheFactory, spi.logProvider(), compilerFactory, innerCompilerFactory);
} else if (spi.config().get(GraphDatabaseInternalSettings.snapshot_query)) {
return new SnapshotExecutionEngine(queryService, spi.config(), cacheFactory, spi.logProvider(), compilerFactory);
} else {
return new ExecutionEngine(queryService, cacheFactory, spi.logProvider(), compilerFactory);
}
}
Aggregations