diff --git a/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/CreateUniqueAcceptanceTest.scala b/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/CreateUniqueAcceptanceTest.scala index 36d1959eedf55..31152107be82f 100644 --- a/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/CreateUniqueAcceptanceTest.scala +++ b/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/CreateUniqueAcceptanceTest.scala @@ -20,6 +20,7 @@ package org.neo4j.internal.cypher.acceptance import org.neo4j.cypher._ +import org.neo4j.cypher.internal.QueryStatistics import org.neo4j.graphdb.{Node, Path, Relationship} import scala.collection.JavaConverters._ diff --git a/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/LoadCsvAcceptanceTest.scala b/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/LoadCsvAcceptanceTest.scala index ce311f9cc999a..549897c0f62a7 100644 --- a/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/LoadCsvAcceptanceTest.scala +++ b/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/LoadCsvAcceptanceTest.scala @@ -22,6 +22,7 @@ package org.neo4j.internal.cypher.acceptance import java.io.{File, PrintWriter} import java.net.{URLConnection, URLStreamHandler, URLStreamHandlerFactory, URL} import org.neo4j.cypher._ +import org.neo4j.cypher.internal.ExecutionEngine import org.neo4j.cypher.internal.compiler.v3_0.test_helpers.CreateTempFileTestSupport import org.neo4j.cypher.internal.frontend.v3_0.helpers.StringHelper.RichString import org.neo4j.graphdb.factory.GraphDatabaseSettings diff --git a/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/MatchLongPatternAcceptanceTest.scala b/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/MatchLongPatternAcceptanceTest.scala index 8e14b18436056..9ce713cd45c25 100644 --- a/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/MatchLongPatternAcceptanceTest.scala +++ b/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/MatchLongPatternAcceptanceTest.scala @@ -22,6 +22,7 @@ package org.neo4j.internal.cypher.acceptance import java.util import org.neo4j.cypher._ +import org.neo4j.cypher.internal.{PlanDescription, ExecutionEngine} import org.neo4j.cypher.internal.compiler.v3_0.planner.logical.idp.IDPSolverMonitor import org.neo4j.graphdb.GraphDatabaseService import org.neo4j.graphdb.config.Setting diff --git a/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/PreParsingAcceptanceTest.scala b/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/PreParsingAcceptanceTest.scala index 384693b739525..b43ea7613b600 100644 --- a/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/PreParsingAcceptanceTest.scala +++ b/community/cypher/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/PreParsingAcceptanceTest.scala @@ -19,9 +19,10 @@ */ package org.neo4j.internal.cypher.acceptance +import org.neo4j.cypher.internal.ExtendedExecutionResult import org.neo4j.cypher.internal.compatibility.CompatibilityPlanDescriptionFor3_0 import org.neo4j.cypher.internal.compiler.v3_0._ -import org.neo4j.cypher.{ExecutionEngineFunSuite, ExtendedExecutionResult} +import org.neo4j.cypher.ExecutionEngineFunSuite import org.scalatest.matchers.{MatchResult, Matcher} class PreParsingAcceptanceTest extends ExecutionEngineFunSuite { diff --git a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/Description.java b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/Description.java similarity index 86% rename from community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/Description.java rename to community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/Description.java index 4605886e94e68..bf4a739915427 100644 --- a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/Description.java +++ b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/Description.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.cypher.javacompat; +package org.neo4j.cypher.javacompat.internal; import scala.collection.JavaConversions; @@ -28,17 +28,18 @@ import java.util.NoSuchElementException; import java.util.Set; -import org.neo4j.cypher.ExtendedPlanDescription; +import org.neo4j.cypher.internal.ExtendedPlanDescription; import org.neo4j.cypher.ProfilerStatisticsNotReadyException; +import org.neo4j.cypher.internal.PlanDescription; import org.neo4j.graphdb.ExecutionPlanDescription; import static org.neo4j.helpers.Exceptions.withCause; class Description implements ExecutionPlanDescription { - private final org.neo4j.cypher.PlanDescription description; + private final org.neo4j.cypher.internal.PlanDescription description; - public Description( org.neo4j.cypher.PlanDescription description ) + public Description( PlanDescription description ) { this.description = description; } @@ -59,7 +60,7 @@ public String getName() public List getChildren() { List result = new ArrayList<>(); - for ( org.neo4j.cypher.PlanDescription child : JavaConversions.asJavaIterable( description.children() ) ) + for ( PlanDescription child : JavaConversions.asJavaIterable( description.children() ) ) { result.add( new Description( child ) ); } @@ -91,7 +92,7 @@ public boolean hasProfilerStatistics() @Override public ProfilerStatistics getProfilerStatistics() { - final org.neo4j.cypher.javacompat.ProfilerStatistics statistics; + final org.neo4j.cypher.javacompat.internal.ProfilerStatistics statistics; try { statistics = description.asJava().getProfilerStatistics(); diff --git a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/ExecutionEngine.java b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ExecutionEngine.java similarity index 92% rename from community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/ExecutionEngine.java rename to community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ExecutionEngine.java index b85f26a8a7173..f301394a5f1b3 100644 --- a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/ExecutionEngine.java +++ b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ExecutionEngine.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.cypher.javacompat; +package org.neo4j.cypher.javacompat.internal; import java.util.Map; @@ -33,12 +33,10 @@ * This class construct and initialize both the cypher compiler and the cypher runtime, which is a very expensive * operation so please make sure this will be constructed only once and properly reused. * - * @deprecated use {@link org.neo4j.graphdb.GraphDatabaseService#execute(String)} instead. */ -@Deprecated public class ExecutionEngine { - private org.neo4j.cypher.ExecutionEngine inner; + private org.neo4j.cypher.internal.ExecutionEngine inner; /** * Creates an execution engine around the give graph database @@ -59,10 +57,9 @@ public ExecutionEngine( GraphDatabaseService database, LogProvider logProvider ) inner = createInnerEngine( database, logProvider ); } - protected - org.neo4j.cypher.ExecutionEngine createInnerEngine( GraphDatabaseService database, LogProvider logProvider ) + protected org.neo4j.cypher.internal.ExecutionEngine createInnerEngine( GraphDatabaseService database, LogProvider logProvider ) { - return new org.neo4j.cypher.ExecutionEngine( database, logProvider ); + return new org.neo4j.cypher.internal.ExecutionEngine( database, logProvider ); } /** diff --git a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/ExecutionResult.java b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ExecutionResult.java similarity index 97% rename from community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/ExecutionResult.java rename to community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ExecutionResult.java index b3533bc1ad3f3..c00d708711986 100644 --- a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/ExecutionResult.java +++ b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ExecutionResult.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.cypher.javacompat; +package org.neo4j.cypher.javacompat.internal; import scala.collection.JavaConversions; @@ -28,6 +28,7 @@ import java.util.stream.Stream; import org.neo4j.cypher.CypherException; +import org.neo4j.cypher.internal.ExtendedExecutionResult; import org.neo4j.graphdb.ExecutionPlanDescription; import org.neo4j.graphdb.Notification; import org.neo4j.graphdb.QueryExecutionException; @@ -49,14 +50,10 @@ * Either iterate directly over the ExecutionResult to retrieve each row of the result * set, or use columnAs() to access a single column with result objects * cast to a type. - * - * @deprecated See {@link org.neo4j.graphdb.Result}, and use - * {@link org.neo4j.graphdb.GraphDatabaseService#execute(String, Map)} instead. */ -@Deprecated public class ExecutionResult implements ResourceIterable>, Result { - private final org.neo4j.cypher.ExtendedExecutionResult inner; + private final ExtendedExecutionResult inner; /** * Initialized lazily and should be accessed with {@link #innerIterator()} method @@ -68,10 +65,10 @@ public class ExecutionResult implements ResourceIterable>, Re * Constructor used by the Cypher framework. End-users should not * create an ExecutionResult directly, but instead use the result * returned from calling {@link ExecutionEngine#execute(String)}. - * + * * @param projection Execution result projection to use. */ - public ExecutionResult( org.neo4j.cypher.ExtendedExecutionResult projection ) + public ExecutionResult( ExtendedExecutionResult projection ) { inner = Objects.requireNonNull( projection ); //if updating query we must fetch the iterator right away in order to eagerly perform updates diff --git a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/PlanDescription.java b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/PlanDescription.java similarity index 79% rename from community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/PlanDescription.java rename to community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/PlanDescription.java index 07d2803a6c90e..510c4f1bd6194 100644 --- a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/PlanDescription.java +++ b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/PlanDescription.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.cypher.javacompat; +package org.neo4j.cypher.javacompat.internal; import java.util.List; @@ -30,17 +30,13 @@ * Instances describe single execution steps in a Cypher query execution plan * * Execution plans form a tree of execution steps. Each step is described by a PlanDescription object. - * - * @deprecated See {@link org.neo4j.graphdb.ExecutionPlanDescription} which you can get from {@link org.neo4j.graphdb.Result} - * when using {@link org.neo4j.graphdb.GraphDatabaseService#execute(String, Map)}. */ -@Deprecated public interface PlanDescription { /** * @return descriptive name for this kind of execution step */ - public String getName(); + String getName(); /** * Retrieve argument map for the associated execution step @@ -50,21 +46,21 @@ public interface PlanDescription * * @return a map containing arguments that describe this execution step in more detail */ - public Map getArguments(); + Map getArguments(); /** * @return list of previous (child) execution step descriptions */ - public List getChildren(); + List getChildren(); /** * @return true, if ProfilerStatistics are available for this execution step */ - public boolean hasProfilerStatistics(); + boolean hasProfilerStatistics(); /** * @return profiler statistics for this execution step iff available * @throws ProfilerStatisticsNotReadyException iff profiler statistics are not available */ - public ProfilerStatistics getProfilerStatistics() throws ProfilerStatisticsNotReadyException; + ProfilerStatistics getProfilerStatistics() throws ProfilerStatisticsNotReadyException; } diff --git a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/ProfilerStatistics.java b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ProfilerStatistics.java similarity index 78% rename from community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/ProfilerStatistics.java rename to community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ProfilerStatistics.java index afb99b1d1f315..8f850778604ba 100644 --- a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/ProfilerStatistics.java +++ b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ProfilerStatistics.java @@ -17,17 +17,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.cypher.javacompat; - -import java.util.Map; +package org.neo4j.cypher.javacompat.internal; /** * Profiler statistics for a single execution step of a Cypher query execution plan - * - * @deprecated See {@link org.neo4j.graphdb.ExecutionPlanDescription.ProfilerStatistics} which you can get from an {@link org.neo4j.graphdb.ExecutionPlanDescription} - * when using {@link org.neo4j.graphdb.GraphDatabaseService#execute(String, Map)}. */ -@Deprecated public interface ProfilerStatistics { /** diff --git a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/QueryStatistics.java b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/QueryStatistics.java similarity index 91% rename from community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/QueryStatistics.java rename to community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/QueryStatistics.java index a12372ac43cc5..8d65166e2431e 100644 --- a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/QueryStatistics.java +++ b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/QueryStatistics.java @@ -17,22 +17,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.cypher.javacompat; - -import java.util.Map; +package org.neo4j.cypher.javacompat.internal; /** * Holds statistics for the execution of a query. - * - * @deprecated See {@link org.neo4j.graphdb.QueryStatistics} which you can get from {@link org.neo4j.graphdb.Result} - * when using {@link org.neo4j.graphdb.GraphDatabaseService#execute(String, Map)}. */ -@Deprecated public class QueryStatistics implements org.neo4j.graphdb.QueryStatistics { - private final org.neo4j.cypher.QueryStatistics inner; + private final org.neo4j.cypher.internal.QueryStatistics inner; - QueryStatistics( org.neo4j.cypher.QueryStatistics inner ) + QueryStatistics( org.neo4j.cypher.internal.QueryStatistics inner ) { this.inner = inner; } diff --git a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ServerExecutionEngine.java b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ServerExecutionEngine.java index 8c14e9a0f9154..405dc3de5c9e7 100644 --- a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ServerExecutionEngine.java +++ b/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/internal/ServerExecutionEngine.java @@ -22,8 +22,6 @@ import java.util.Map; import org.neo4j.cypher.CypherException; -import org.neo4j.cypher.javacompat.ExecutionEngine; -import org.neo4j.cypher.javacompat.ExecutionResult; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Result; import org.neo4j.kernel.impl.query.QueryExecutionEngine; @@ -47,8 +45,7 @@ public ServerExecutionEngine( GraphDatabaseService database, LogProvider logProv } @Override - protected - org.neo4j.cypher.ExecutionEngine createInnerEngine( GraphDatabaseService database, LogProvider logProvider ) + protected org.neo4j.cypher.internal.ExecutionEngine createInnerEngine( GraphDatabaseService database, LogProvider logProvider ) { return serverExecutionEngine = new org.neo4j.cypher.internal.ServerExecutionEngine( database, logProvider ); } diff --git a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/PlanCacheMetricsMonitor.scala b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/PlanCacheMetricsMonitor.scala index f6615cf62b07e..be1f6b39900d2 100644 --- a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/PlanCacheMetricsMonitor.scala +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/PlanCacheMetricsMonitor.scala @@ -21,6 +21,8 @@ package org.neo4j.cypher import java.util.concurrent.atomic.AtomicLong +import org.neo4j.cypher.internal.StringCacheMonitor + class PlanCacheMetricsMonitor extends StringCacheMonitor { private val counter = new AtomicLong() override def cacheDiscard(ignored1: String, ignored2: String): Unit = { diff --git a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/AmendedRootPlanDescription.scala b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/AmendedRootPlanDescription.scala index b20c149bb076a..7c6bb7bee693f 100644 --- a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/AmendedRootPlanDescription.scala +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/AmendedRootPlanDescription.scala @@ -22,8 +22,8 @@ package org.neo4j.cypher.internal import java.util import org.neo4j.cypher.internal.compiler.v3_0.{RuntimeName, PlannerName} -import org.neo4j.cypher.{ExtendedPlanDescription, CypherVersion, PlanDescription} -import org.neo4j.cypher.javacompat.{PlanDescription => JPlanDescription} +import org.neo4j.cypher.javacompat.internal +import org.neo4j.cypher.CypherVersion class AmendedRootPlanDescription(inner: ExtendedPlanDescription, version: CypherVersion, planner: PlannerName, runtime: RuntimeName) @@ -35,7 +35,7 @@ class AmendedRootPlanDescription(inner: ExtendedPlanDescription, version: Cypher def name = inner.name - def asJava = new JPlanDescription { + def asJava = new internal.PlanDescription { val getName = name val getProfilerStatistics = childAsJava.getProfilerStatistics diff --git a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/ExecutionEngine.scala b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExecutionEngine.scala similarity index 98% rename from community/cypher/cypher/src/main/scala/org/neo4j/cypher/ExecutionEngine.scala rename to community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExecutionEngine.scala index 31537dcea4206..23fa2f1f455c0 100644 --- a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/ExecutionEngine.scala +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExecutionEngine.scala @@ -17,16 +17,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.cypher +package org.neo4j.cypher.internal import java.lang.Boolean.FALSE import java.util.{Map => JavaMap} +import org.neo4j.cypher._ import org.neo4j.cypher.internal.compiler.v3_0.helpers.JavaResultValueConverter import org.neo4j.cypher.internal.compiler.v3_0.prettifier.Prettifier import org.neo4j.cypher.internal.compiler.v3_0.{LRUCache => LRUCachev3_0, _} import org.neo4j.cypher.internal.tracing.{CompilationTracer, TimingCompilationTracer} -import org.neo4j.cypher.internal.{CypherCompiler, _} import org.neo4j.graphdb.GraphDatabaseService import org.neo4j.graphdb.config.Setting import org.neo4j.graphdb.factory.GraphDatabaseSettings @@ -43,10 +43,7 @@ trait StringCacheMonitor extends CypherCacheMonitor[String, api.Statement] /** * This class construct and initialize both the cypher compiler and the cypher runtime, which is a very expensive * operation so please make sure this will be constructed only once and properly reused. - * - * @deprecated use { @link org.neo4j.graphdb.GraphDatabaseService#execute(String)} instead. */ -@Deprecated class ExecutionEngine(graph: GraphDatabaseService, logProvider: LogProvider = NullLogProvider.getInstance()) { require(graph != null, "Can't work with a null graph database") diff --git a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExecutionPlan.scala b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExecutionPlan.scala index 3a904bbf76dfc..ea292d02b128e 100644 --- a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExecutionPlan.scala +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExecutionPlan.scala @@ -19,7 +19,6 @@ */ package org.neo4j.cypher.internal -import org.neo4j.cypher.ExtendedExecutionResult import org.neo4j.graphdb.Transaction import org.neo4j.kernel.GraphDatabaseAPI import org.neo4j.kernel.api.Statement diff --git a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/package-info.java b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExecutionResult.scala similarity index 57% rename from community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/package-info.java rename to community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExecutionResult.scala index 43e3e63ef2258..2d661d9424cb5 100644 --- a/community/cypher/cypher/src/main/java/org/neo4j/cypher/javacompat/package-info.java +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExecutionResult.scala @@ -17,7 +17,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -/** - * Execute Cypher queries from Java code. - */ -package org.neo4j.cypher.javacompat; +package org.neo4j.cypher.internal + +import java.io.PrintWriter + +import org.neo4j.graphdb.ResourceIterator + +trait ExecutionResult extends Iterator[Map[String, Any]] { + def columns: List[String] + def javaColumns: java.util.List[String] + def javaColumnAs[T](column: String): ResourceIterator[T] + def columnAs[T](column: String): Iterator[T] + def javaIterator: ResourceIterator[java.util.Map[String, Any]] + def dumpToString(writer: PrintWriter) + def dumpToString(): String + def queryStatistics(): QueryStatistics + def executionPlanDescription(): PlanDescription + def close() +} diff --git a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/ExtendedExecutionResult.scala b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExtendedExecutionResult.scala similarity index 83% rename from community/cypher/cypher/src/main/scala/org/neo4j/cypher/ExtendedExecutionResult.scala rename to community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExtendedExecutionResult.scala index b29dea4f5fabc..c4c899d12a98e 100644 --- a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/ExtendedExecutionResult.scala +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExtendedExecutionResult.scala @@ -17,16 +17,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.cypher +package org.neo4j.cypher.internal import org.neo4j.graphdb.Result.ResultVisitor -import org.neo4j.graphdb._ +import org.neo4j.graphdb.{Notification, QueryExecutionType} -/** - * @deprecated See { @link org.neo4j.graphdb.Result}, and use - * { @link org.neo4j.graphdb.GraphDatabaseService#execute(String, Map)} instead. - */ -@Deprecated trait ExtendedExecutionResult extends ExecutionResult { def planDescriptionRequested: Boolean def executionType: QueryExecutionType diff --git a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/ExtendedPlanDescription.scala b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExtendedPlanDescription.scala similarity index 83% rename from community/cypher/cypher/src/main/scala/org/neo4j/cypher/ExtendedPlanDescription.scala rename to community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExtendedPlanDescription.scala index d571ee3dcad21..09284dbdbc552 100644 --- a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/ExtendedPlanDescription.scala +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ExtendedPlanDescription.scala @@ -17,15 +17,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.cypher +package org.neo4j.cypher.internal /** * this class contains extra information about identifiers - * - * @deprecated See { @link org.neo4j.graphdb.ExecutionPlanDescription}, and use - * { @link org.neo4j.graphdb.GraphDatabaseService#execute(String, Map)} instead. */ -@Deprecated trait ExtendedPlanDescription extends PlanDescription { def identifiers: Set[String] def extendedChildren: Seq[ExtendedPlanDescription] diff --git a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/PlanDescription.scala b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/PlanDescription.scala similarity index 86% rename from community/cypher/cypher/src/main/scala/org/neo4j/cypher/PlanDescription.scala rename to community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/PlanDescription.scala index 9e8ac40adec8e..4ffddcb53fcb3 100644 --- a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/PlanDescription.scala +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/PlanDescription.scala @@ -17,13 +17,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.cypher +package org.neo4j.cypher.internal + /** * Abstract description of an execution plan - * @deprecated See { @link org.neo4j.graphdb.ExecutionPlanDescription}, and use - * { @link org.neo4j.graphdb.GraphDatabaseService#execute(String, Map)} instead. */ -@Deprecated trait PlanDescription { self => @@ -35,7 +33,7 @@ trait PlanDescription { def children: Seq[PlanDescription] = throw new UnsupportedOperationException("This should not have been called") def hasProfilerStatistics: Boolean = throw new UnsupportedOperationException("This should not have been called") - def asJava: javacompat.PlanDescription + def asJava: org.neo4j.cypher.javacompat.internal.PlanDescription def render(builder: StringBuilder) {} def render(builder: StringBuilder, separator: String, levelSuffix: String) {} diff --git a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/ExecutionResult.scala b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/QueryStatistics.scala similarity index 79% rename from community/cypher/cypher/src/main/scala/org/neo4j/cypher/ExecutionResult.scala rename to community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/QueryStatistics.scala index 00c89b349e37d..ad0fbf65332d8 100644 --- a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/ExecutionResult.scala +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/QueryStatistics.scala @@ -17,33 +17,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.cypher - -import java.io.PrintWriter - -import org.neo4j.graphdb.ResourceIterator - -/** - * @deprecated See { @link org.neo4j.graphdb.Result}, and use - * { @link org.neo4j.graphdb.GraphDatabaseService#execute(String, Map)} instead. - */ -@Deprecated -trait ExecutionResult extends Iterator[Map[String, Any]] { - def columns: List[String] - def javaColumns: java.util.List[String] - def javaColumnAs[T](column: String): ResourceIterator[T] - def columnAs[T](column: String): Iterator[T] - def javaIterator: ResourceIterator[java.util.Map[String, Any]] - def dumpToString(writer: PrintWriter) - def dumpToString(): String - def queryStatistics(): QueryStatistics - def executionPlanDescription(): PlanDescription - def close() -} +package org.neo4j.cypher.internal // Whenever you add a field here, please update the following classes: // -// org.neo4j.cypher.javacompat.QueryStatistics +// org.neo4j.cypher.javacompat.internal.QueryStatistics // org.neo4j.server.rest.repr.CypherResultRepresentation // org.neo4j.server.rest.CypherFunctionalTest // org.neo4j.cypher.QueryStatisticsTestSupport @@ -98,4 +76,3 @@ case class QueryStatistics(nodesCreated: Int = 0, } } - diff --git a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ServerExecutionEngine.scala b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ServerExecutionEngine.scala index 0cba576bae659..2075c39b30782 100644 --- a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ServerExecutionEngine.scala +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/ServerExecutionEngine.scala @@ -20,7 +20,6 @@ package org.neo4j.cypher.internal import org.neo4j.graphdb.GraphDatabaseService -import org.neo4j.cypher.ExecutionEngine import org.neo4j.logging.{NullLogProvider, LogProvider} /** diff --git a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/compatibility/CompatibilityFor2_3.scala b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/compatibility/CompatibilityFor2_3.scala index 505e031ce6675..66d6cd6d6f59c 100644 --- a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/compatibility/CompatibilityFor2_3.scala +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/compatibility/CompatibilityFor2_3.scala @@ -22,7 +22,7 @@ package org.neo4j.cypher.internal.compatibility import java.io.PrintWriter import java.util -import org.neo4j.cypher.internal._ +import org.neo4j.cypher._ import org.neo4j.cypher.internal.compiler.v2_3.executionplan.{EntityAccessor, ExecutionPlan => ExecutionPlan_v2_3, InternalExecutionResult} import org.neo4j.cypher.internal.compiler.v2_3.planDescription.InternalPlanDescription.Arguments._ import org.neo4j.cypher.internal.compiler.v2_3.planDescription.{Argument, InternalPlanDescription, PlanDescriptionArgumentSerializer} @@ -32,10 +32,10 @@ import org.neo4j.cypher.internal.compiler.v2_3.{CypherCompilerFactory, DPPlanner import org.neo4j.cypher.internal.compiler.{v2_3, v3_0} import org.neo4j.cypher.internal.frontend.v2_3.notification.{InternalNotification, LegacyPlannerNotification, PlannerUnsupportedNotification, RuntimeUnsupportedNotification, _} import org.neo4j.cypher.internal.frontend.v2_3.spi.MapToPublicExceptions -import org.neo4j.cypher.internal.frontend.v2_3.{CypherException => InternalCypherException} +import org.neo4j.cypher.internal.frontend.v2_3.{CypherException => InternalCypherException, InputPosition => InternalInputPosition} import org.neo4j.cypher.internal.spi.v2_3.{GeneratedQueryStructure, TransactionBoundGraphStatistics, TransactionBoundPlanContext, TransactionBoundQueryContext} -import org.neo4j.cypher.javacompat.ProfilerStatistics -import org.neo4j.cypher.{QueryStatistics, _} +import org.neo4j.cypher.internal.{CypherExecutionMode, ExtendedExecutionResult, ExtendedPlanDescription, LastCommittedTxIdProvider, ParsedQuery, PreParsedQuery, QueryStatistics, TransactionInfo} +import org.neo4j.cypher.javacompat.internal.ProfilerStatistics import org.neo4j.graphdb.Result.ResultVisitor import org.neo4j.graphdb._ import org.neo4j.graphdb.impl.notification.{NotificationCode, NotificationDetail} @@ -168,7 +168,7 @@ trait CompatibilityFor2_3 { new ParsedQuery { def isPeriodicCommit = preparedQueryForV_2_3.map(_.isPeriodicCommit).getOrElse(false) - def plan(statement: Statement, tracer: v3_0.CompilationPhaseTracer): (ExecutionPlan, Map[String, Any]) = exceptionHandlerFor2_3.runSafely { + def plan(statement: Statement, tracer: v3_0.CompilationPhaseTracer): (org.neo4j.cypher.internal.ExecutionPlan, Map[String, Any]) = exceptionHandlerFor2_3.runSafely { val planContext: PlanContext = new TransactionBoundPlanContext(statement, graph) val (planImpl, extractedParameters) = compiler.planPreparedQuery(preparedQueryForV_2_3.get, planContext, as2_3(tracer)) @@ -182,7 +182,7 @@ trait CompatibilityFor2_3 { } } - class ExecutionPlanWrapper(inner: ExecutionPlan_v2_3) extends ExecutionPlan { + class ExecutionPlanWrapper(inner: ExecutionPlan_v2_3) extends org.neo4j.cypher.internal.ExecutionPlan { private def queryContext(graph: GraphDatabaseAPI, txInfo: TransactionInfo): QueryContext = { val ctx = new TransactionBoundQueryContext(graph, txInfo.tx, txInfo.isTopLevelTx, txInfo.statement) @@ -342,7 +342,7 @@ case class ExecutionResultWrapperFor2_3(inner: InternalExecutionResult, planner: getClass.getName + "@" + Integer.toHexString(hashCode()) } - private implicit class ConvertibleCompilerInputPosition(pos: frontend.v2_3.InputPosition) { + private implicit class ConvertibleCompilerInputPosition(pos: InternalInputPosition) { def asInputPosition = new InputPosition(pos.offset, pos.line, pos.column) } } @@ -369,7 +369,7 @@ case class CompatibilityPlanDescriptionFor2_3(inner: InternalPlanDescription, ve def name = exceptionHandlerFor2_3.runSafely { inner.name } - def asJava: javacompat.PlanDescription = exceptionHandlerFor2_3.runSafely { asJava(self) } + def asJava: javacompat.internal.PlanDescription = exceptionHandlerFor2_3.runSafely { asJava(self) } override def toString: String = { val NL = System.lineSeparator() @@ -378,7 +378,7 @@ case class CompatibilityPlanDescriptionFor2_3(inner: InternalPlanDescription, ve } } - def asJava(in: ExtendedPlanDescription): javacompat.PlanDescription = new javacompat.PlanDescription { + def asJava(in: ExtendedPlanDescription): javacompat.internal.PlanDescription = new javacompat.internal.PlanDescription { def getProfilerStatistics: ProfilerStatistics = new ProfilerStatistics { def getDbHits: Long = extract { case DbHits(count) => count} @@ -396,7 +396,7 @@ case class CompatibilityPlanDescriptionFor2_3(inner: InternalPlanDescription, ve def getIdentifiers: util.Set[String] = identifiers.asJava - def getChildren: util.List[javacompat.PlanDescription] = in.extendedChildren.toList.map(_.asJava).asJava + def getChildren: util.List[javacompat.internal.PlanDescription] = in.extendedChildren.toList.map(_.asJava).asJava override def toString: String = self.toString } diff --git a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/compatibility/CompatibilityFor3_0.scala b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/compatibility/CompatibilityFor3_0.scala index 0144c68655c7d..6d15a1d298972 100644 --- a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/compatibility/CompatibilityFor3_0.scala +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/compatibility/CompatibilityFor3_0.scala @@ -36,7 +36,7 @@ import org.neo4j.cypher.internal.frontend.v3_0.spi.MapToPublicExceptions import org.neo4j.cypher.internal.frontend.v3_0.{CypherException => InternalCypherException} import org.neo4j.cypher.internal.spi.v3_0.TransactionBoundQueryContext.IndexSearchMonitor import org.neo4j.cypher.internal.spi.v3_0._ -import org.neo4j.cypher.javacompat.ProfilerStatistics +import org.neo4j.cypher.javacompat.internal.ProfilerStatistics import org.neo4j.graphdb.Result.{ResultRow, ResultVisitor} import org.neo4j.graphdb.impl.notification.{NotificationCode, NotificationDetail} import org.neo4j.graphdb.{GraphDatabaseService, InputPosition, Node, Path, QueryExecutionType, Relationship, ResourceIterator} @@ -412,7 +412,7 @@ case class CompatibilityPlanDescriptionFor3_0(inner: InternalPlanDescription, ve def name = exceptionHandlerFor3_0.runSafely { inner.name } - def asJava: javacompat.PlanDescription = exceptionHandlerFor3_0.runSafely { asJava(self) } + def asJava: javacompat.internal.PlanDescription = exceptionHandlerFor3_0.runSafely { asJava(self) } override def toString: String = { val NL = System.lineSeparator() @@ -421,7 +421,7 @@ case class CompatibilityPlanDescriptionFor3_0(inner: InternalPlanDescription, ve } } - def asJava(in: ExtendedPlanDescription): javacompat.PlanDescription = new javacompat.PlanDescription { + def asJava(in: ExtendedPlanDescription): javacompat.internal.PlanDescription = new javacompat.internal.PlanDescription { def getProfilerStatistics: ProfilerStatistics = new ProfilerStatistics { def getDbHits: Long = extract { case DbHits(count) => count} @@ -439,7 +439,7 @@ case class CompatibilityPlanDescriptionFor3_0(inner: InternalPlanDescription, ve def getIdentifiers: util.Set[String] = identifiers.asJava - def getChildren: util.List[javacompat.PlanDescription] = in.extendedChildren.toList.map(_.asJava).asJava + def getChildren: util.List[javacompat.internal.PlanDescription] = in.extendedChildren.toList.map(_.asJava).asJava override def toString: String = self.toString } diff --git a/community/cypher/cypher/src/test/java/org/neo4j/cypher/ManyMergesStressTest.java b/community/cypher/cypher/src/test/java/org/neo4j/cypher/ManyMergesStressTest.java index 57aa4cfa09474..0c0e0dda28328 100644 --- a/community/cypher/cypher/src/test/java/org/neo4j/cypher/ManyMergesStressTest.java +++ b/community/cypher/cypher/src/test/java/org/neo4j/cypher/ManyMergesStressTest.java @@ -27,7 +27,8 @@ import org.junit.Rule; import org.junit.Test; -import org.neo4j.cypher.javacompat.ExecutionResult; +import org.neo4j.cypher.javacompat.internal.ExecutionEngine; +import org.neo4j.cypher.javacompat.internal.ExecutionResult; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Label; import org.neo4j.graphdb.Transaction; @@ -79,7 +80,7 @@ public void shouldWorkFine() throws IOException tx.success(); } - org.neo4j.cypher.javacompat.ExecutionEngine engine = new org.neo4j.cypher.javacompat.ExecutionEngine( db ); + ExecutionEngine engine = new ExecutionEngine( db ); for( int count = 0; count < TRIES; count++ ) { diff --git a/community/cypher/cypher/src/test/java/org/neo4j/cypher/QueryExecutionMonitorTest.scala b/community/cypher/cypher/src/test/java/org/neo4j/cypher/QueryExecutionMonitorTest.scala index c2e4711d83533..b078fd71ffb6d 100644 --- a/community/cypher/cypher/src/test/java/org/neo4j/cypher/QueryExecutionMonitorTest.scala +++ b/community/cypher/cypher/src/test/java/org/neo4j/cypher/QueryExecutionMonitorTest.scala @@ -22,6 +22,7 @@ package org.neo4j.cypher import java.util.Collections import org.mockito.Mockito._ +import org.neo4j.cypher.internal.ExecutionEngine import org.neo4j.cypher.internal.frontend.v3_0.test_helpers.CypherFunSuite import org.neo4j.graphdb.GraphDatabaseService import org.neo4j.kernel.GraphDatabaseAPI diff --git a/community/cypher/cypher/src/test/java/org/neo4j/cypher/export/ExportTest.java b/community/cypher/cypher/src/test/java/org/neo4j/cypher/export/ExportTest.java index 2592747e9d17f..5a323ea20df5e 100644 --- a/community/cypher/cypher/src/test/java/org/neo4j/cypher/export/ExportTest.java +++ b/community/cypher/cypher/src/test/java/org/neo4j/cypher/export/ExportTest.java @@ -31,7 +31,7 @@ import java.util.Iterator; import java.util.Map; -import org.neo4j.cypher.javacompat.ExecutionResult; +import org.neo4j.cypher.javacompat.internal.ExecutionResult; import org.neo4j.graphalgo.impl.util.PathImpl; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Label; diff --git a/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/CypherLoggingTest.java b/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/CypherLoggingTest.java index 6dcc33f57cd65..095e54298c92e 100644 --- a/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/CypherLoggingTest.java +++ b/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/CypherLoggingTest.java @@ -23,8 +23,8 @@ import org.junit.Test; +import org.neo4j.cypher.javacompat.internal.ExecutionEngine; import org.neo4j.logging.AssertableLogProvider; -import org.neo4j.logging.AssertableLogProvider.LogMatcherBuilder; import org.neo4j.logging.LogProvider; import org.neo4j.test.TestGraphDatabaseFactory; @@ -44,7 +44,7 @@ public void shouldNotLogQueries() throws Exception engine.execute( "MATCH (n) RETURN n" ); // then - inLog( org.neo4j.cypher.ExecutionEngine.class ); + inLog( org.neo4j.cypher.internal.ExecutionEngine.class ); logProvider.assertNoLoggingOccurred(); } diff --git a/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/CypherUpdateMapTest.java b/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/CypherUpdateMapTest.java index ab450b019236e..1d7e17e6df4c2 100644 --- a/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/CypherUpdateMapTest.java +++ b/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/CypherUpdateMapTest.java @@ -22,6 +22,8 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; + +import org.neo4j.cypher.javacompat.internal.ExecutionEngine; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Node; import org.neo4j.graphdb.Transaction; diff --git a/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/ExecutionEngineTests.java b/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/ExecutionEngineTests.java index f31623355ef3e..b66f7fd196d03 100644 --- a/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/ExecutionEngineTests.java +++ b/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/ExecutionEngineTests.java @@ -24,6 +24,9 @@ import org.junit.Rule; import org.junit.Test; + +import org.neo4j.cypher.javacompat.internal.ExecutionEngine; +import org.neo4j.cypher.javacompat.internal.ExecutionResult; import org.neo4j.test.DatabaseRule; import org.neo4j.test.ImpermanentDatabaseRule; @@ -41,7 +44,7 @@ public void shouldConvertListsAndMapsWhenPassingFromScalaToJava() throws Excepti ExecutionEngine executionEngine = new ExecutionEngine( database.getGraphDatabaseService() ); ExecutionResult result = executionEngine.execute( "RETURN { key : 'Value' , " + - "collectionKey: [{ inner: 'Map1' }, { inner: 'Map2' }]}" ); + "collectionKey: [{ inner: 'Map1' }, { inner: 'Map2' }]}" ); Map firstRowValue = (Map) result.iterator().next().values().iterator().next(); assertThat( (String) firstRowValue.get( "key" ), is( "Value" ) ); diff --git a/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/ExecutionResultTest.java b/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/ExecutionResultTest.java index 04c667fb8f268..8b4433cbcef90 100644 --- a/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/ExecutionResultTest.java +++ b/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/ExecutionResultTest.java @@ -28,6 +28,8 @@ import java.util.Map; import org.neo4j.cypher.ArithmeticException; +import org.neo4j.cypher.javacompat.internal.ExecutionEngine; +import org.neo4j.cypher.javacompat.internal.ExecutionResult; import org.neo4j.graphdb.Node; import org.neo4j.graphdb.ResourceIterator; import org.neo4j.graphdb.Result; diff --git a/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/JavaValueCompatibilityTest.java b/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/JavaValueCompatibilityTest.java index 1be41a4f16c30..c23dd947503c4 100644 --- a/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/JavaValueCompatibilityTest.java +++ b/community/cypher/cypher/src/test/java/org/neo4j/cypher/javacompat/JavaValueCompatibilityTest.java @@ -26,6 +26,9 @@ import org.junit.Before; import org.junit.Test; + +import org.neo4j.cypher.javacompat.internal.ExecutionEngine; +import org.neo4j.cypher.javacompat.internal.ExecutionResult; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.ResourceIterator; import org.neo4j.test.TestGraphDatabaseFactory; diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/CypherCompatibilityTest.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/CypherCompatibilityTest.scala index d097423ba3b92..09ee6edf83306 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/CypherCompatibilityTest.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/CypherCompatibilityTest.scala @@ -19,6 +19,7 @@ */ package org.neo4j.cypher +import org.neo4j.cypher.internal.ExecutionEngine import org.neo4j.graphdb.factory.GraphDatabaseSettings import org.neo4j.kernel.api.exceptions.Status diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/CypherCompilerStringCacheMonitoringAcceptanceTest.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/CypherCompilerStringCacheMonitoringAcceptanceTest.scala index 5cb9c95faba74..0c249680db8ae 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/CypherCompilerStringCacheMonitoringAcceptanceTest.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/CypherCompilerStringCacheMonitoringAcceptanceTest.scala @@ -19,6 +19,7 @@ */ package org.neo4j.cypher +import org.neo4j.cypher.internal.{StringCacheMonitor, ExecutionEngine} import org.neo4j.graphdb.config.Setting import org.neo4j.graphdb.factory.GraphDatabaseSettings import org.neo4j.kernel.api diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineIT.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineIT.scala index fe7ef79db2abd..94a80c6cc43a6 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineIT.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineIT.scala @@ -19,6 +19,7 @@ */ package org.neo4j.cypher +import org.neo4j.cypher.internal.ExecutionEngine import org.neo4j.cypher.internal.compiler.v3_0.CostBasedPlannerName import org.neo4j.cypher.internal.frontend.v3_0.test_helpers.CypherFunSuite import org.neo4j.graphdb.GraphDatabaseService diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTest.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTest.scala index bd83d8d7f12ba..da42bf2fe0897 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTest.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTest.scala @@ -22,6 +22,7 @@ package org.neo4j.cypher import java.io.{File, PrintWriter} import java.util.concurrent.TimeUnit +import org.neo4j.cypher.internal.ExecutionEngine import org.neo4j.cypher.internal.compiler.v3_0.CompilationPhaseTracer.CompilationPhase import org.neo4j.cypher.internal.compiler.v3_0.test_helpers.CreateTempFileTestSupport import org.neo4j.cypher.internal.tracing.TimingCompilationTracer diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTestSupport.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTestSupport.scala index ea31c3e44cf96..ed8cd3b809ad2 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTestSupport.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTestSupport.scala @@ -23,7 +23,7 @@ import java.util.concurrent.TimeUnit import org.hamcrest.CoreMatchers._ import org.junit.Assert._ -import org.neo4j.cypher.internal.RewindableExecutionResult +import org.neo4j.cypher.internal.{ExecutionEngine, RewindableExecutionResult} import org.neo4j.cypher.internal.compiler.v3_0.executionplan.InternalExecutionResult import org.neo4j.cypher.internal.frontend.v3_0.test_helpers.{CypherFunSuite, CypherTestSupport} diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/IndexOpAcceptanceTest.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/IndexOpAcceptanceTest.scala index 163e84b408f73..636e5fc683877 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/IndexOpAcceptanceTest.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/IndexOpAcceptanceTest.scala @@ -19,6 +19,7 @@ */ package org.neo4j.cypher +import org.neo4j.cypher.internal.ExecutionEngine import org.neo4j.kernel.api.exceptions.schema.{NoSuchIndexException, DropIndexFailureException} import java.util.concurrent.TimeUnit import java.io.{FileOutputStream, File} diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ProfilerAcceptanceTest.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ProfilerAcceptanceTest.scala index 1deb073225baf..8bbe5784530a1 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ProfilerAcceptanceTest.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/ProfilerAcceptanceTest.scala @@ -19,6 +19,7 @@ */ package org.neo4j.cypher +import org.neo4j.cypher.internal.ExecutionResult import org.neo4j.cypher.internal.compiler.v3_0 import org.neo4j.cypher.internal.compiler.v3_0.executionplan.InternalExecutionResult import org.neo4j.cypher.internal.compiler.v3_0.planDescription.InternalPlanDescription.Arguments.{DbHits, EstimatedRows, Rows} diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/QueryCachingTest.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/QueryCachingTest.scala index 1a977b27dd4f9..e8cf2dda72720 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/QueryCachingTest.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/QueryCachingTest.scala @@ -19,6 +19,7 @@ */ package org.neo4j.cypher +import org.neo4j.cypher.internal.StringCacheMonitor import org.neo4j.cypher.internal.frontend.v3_0.test_helpers.CypherFunSuite import org.neo4j.graphdb.Label import org.neo4j.kernel.api.Statement diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/QueryStatisticsTestSupport.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/QueryStatisticsTestSupport.scala index 2bc1f099fe883..bab53ddd049c9 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/QueryStatisticsTestSupport.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/QueryStatisticsTestSupport.scala @@ -21,6 +21,7 @@ package org.neo4j.cypher import java.util +import org.neo4j.cypher.internal.QueryStatistics import org.neo4j.cypher.internal.compatibility.ExecutionResultWrapperFor3_0 import org.neo4j.cypher.internal.compiler.v3_0.executionplan.InternalExecutionResult import org.neo4j.cypher.internal.compiler.v3_0.{CompiledRuntimeName, CostBasedPlannerName} diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/RunWithConfigTestSupport.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/RunWithConfigTestSupport.scala index 5fc8237fda1a0..25ce659a27dde 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/RunWithConfigTestSupport.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/RunWithConfigTestSupport.scala @@ -21,6 +21,7 @@ package org.neo4j.cypher import java.util +import org.neo4j.cypher.internal.ExecutionEngine import org.neo4j.graphdb.config.Setting import org.neo4j.test.TestGraphDatabaseFactory diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/TestSuites.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/TestSuites.scala index 13c9c7f34b346..576fe9fed4eed 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/TestSuites.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/TestSuites.scala @@ -19,6 +19,7 @@ */ package org.neo4j.cypher +import org.neo4j.cypher.internal.ExtendedExecutionResult import org.neo4j.cypher.internal.compiler.v3_0.executionplan.InternalExecutionResult import org.neo4j.cypher.internal.compiler.v3_0.planDescription.InternalPlanDescription import org.neo4j.cypher.internal.frontend.v3_0.test_helpers.CypherFunSuite diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/internal/RewindableExecutionResult.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/internal/RewindableExecutionResult.scala index 72b4a988af5c9..adb2f79dd4738 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/internal/RewindableExecutionResult.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/internal/RewindableExecutionResult.scala @@ -30,7 +30,7 @@ import org.neo4j.cypher.internal.compiler.v3_0.planDescription.InternalPlanDescr import org.neo4j.cypher.internal.compiler.v3_0.planDescription.InternalPlanDescription.Arguments.{Planner, Runtime} import org.neo4j.cypher.internal.compiler.v3_0.spi.InternalResultVisitor import org.neo4j.cypher.internal.frontend.v3_0.notification.InternalNotification -import org.neo4j.cypher.{ExecutionResult, InternalException} +import org.neo4j.cypher.InternalException import org.neo4j.graphdb.{QueryExecutionType, ResourceIterator} object RewindableExecutionResult { diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/internal/compiler/v3_0/LazyTest.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/internal/compiler/v3_0/LazyTest.scala index 1aa1989019f03..bab6db7bc4d80 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/internal/compiler/v3_0/LazyTest.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/internal/compiler/v3_0/LazyTest.scala @@ -28,7 +28,7 @@ import org.mockito.Mockito._ import org.mockito.invocation.InvocationOnMock import org.mockito.stubbing.Answer import org.neo4j.cypher._ -import org.neo4j.cypher.internal.ExecutionPlan +import org.neo4j.cypher.internal.{ExecutionResult, ExecutionEngine, ExecutionPlan} import org.neo4j.cypher.internal.compiler.v3_0.commands.expressions.{Literal, Variable} import org.neo4j.cypher.internal.compiler.v3_0.commands.predicates.{GreaterThan, True} import org.neo4j.cypher.internal.compiler.v3_0.helpers.{CountingIterator, Counter} diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/performance/PerformanceTest.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/performance/PerformanceTest.scala index 1b76579872948..a45766186aba9 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/performance/PerformanceTest.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/performance/PerformanceTest.scala @@ -19,7 +19,7 @@ */ package org.neo4j.cypher.performance -import org.neo4j.cypher.ExecutionEngine +import org.neo4j.cypher.internal.ExecutionEngine import org.neo4j.cypher.internal.frontend.v3_0.test_helpers.CypherFunSuite import org.neo4j.graphdb.factory.GraphDatabaseFactory import org.neo4j.graphdb.{GraphDatabaseService, Node, RelationshipType} diff --git a/community/server/src/main/java/org/neo4j/server/database/ExecutionEngineProvider.java b/community/server/src/main/java/org/neo4j/server/database/ExecutionEngineProvider.java index 3b524941dba29..6a25931e311f3 100644 --- a/community/server/src/main/java/org/neo4j/server/database/ExecutionEngineProvider.java +++ b/community/server/src/main/java/org/neo4j/server/database/ExecutionEngineProvider.java @@ -22,7 +22,7 @@ import javax.ws.rs.ext.Provider; import com.sun.jersey.api.core.HttpContext; -import org.neo4j.cypher.javacompat.ExecutionEngine; +import org.neo4j.cypher.javacompat.internal.ExecutionEngine; /** * This exists as a convenience for extension authors, to access the cypher execution engine.