Skip to content

Commit

Permalink
Create cypher-3.0 module
Browse files Browse the repository at this point in the history
- 3.0 only depends on 2.3
  • Loading branch information
pontusmelke committed Sep 29, 2015
1 parent f1aef32 commit 150064a
Show file tree
Hide file tree
Showing 1,455 changed files with 8,659 additions and 7,994 deletions.
8 changes: 4 additions & 4 deletions community/bolt/src/docs/dev/examples.asciidoc
Expand Up @@ -311,7 +311,7 @@ Server: SUCCESS {
"args": {
"runtime-impl": "INTERPRETED",
"planner-impl": "IDP",
"version": "CYPHER 2.3",
"version": "CYPHER 3.0",
"KeyNames": "num",
"EstimatedRows": 1.0,
"planner": "COST",
Expand All @@ -335,7 +335,7 @@ Server: SUCCESS {
2D 69 6D 70 6C 8B 49 4E 54 45 52 50 52 45 54 45
44 8C 70 6C 61 6E 6E 65 72 2D 69 6D 70 6C 83 49
44 50 87 76 65 72 73 69 6F 6E 8A 43 59 50 48 45
52 20 32 2E 33 88 4B 65 79 4E 61 6D 65 73 83 6E
52 20 33 2E 30 88 4B 65 79 4E 61 6D 65 73 83 6E
75 6D 8D 45 73 74 69 6D 61 74 65 64 52 6F 77 73
C1 3F F0 00 00 00 00 00 00 87 70 6C 61 6E 6E 65
72 84 43 4F 53 54 87 72 75 6E 74 69 6D 65 8B 49
Expand Down Expand Up @@ -379,7 +379,7 @@ Server: SUCCESS {
"args": {
"runtime-impl": "INTERPRETED",
"planner-impl": "IDP",
"version": "CYPHER 2.3",
"version": "CYPHER 3.0",
"KeyNames": "num",
"EstimatedRows": 1.0,
"planner": "COST",
Expand Down Expand Up @@ -408,7 +408,7 @@ Server: SUCCESS {
2D 69 6D 70 6C 8B 49 4E 54 45 52 50 52 45 54 45
44 8C 70 6C 61 6E 6E 65 72 2D 69 6D 70 6C 83 49
44 50 87 76 65 72 73 69 6F 6E 8A 43 59 50 48 45
52 20 32 2E 33 88 4B 65 79 4E 61 6D 65 73 83 6E
52 20 33 2E 30 88 4B 65 79 4E 61 6D 65 73 83 6E
75 6D 8D 45 73 74 69 6D 61 74 65 64 52 6F 77 73
C1 3F F0 00 00 00 00 00 00 87 70 6C 61 6E 6E 65
72 84 43 4F 53 54 87 72 75 6E 74 69 6D 65 8B 49
Expand Down
4 changes: 2 additions & 2 deletions community/cypher/acceptance/pom.xml
Expand Up @@ -152,7 +152,7 @@
<!-- neo4j-cypher -->
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-compiler-2.3</artifactId>
<artifactId>neo4j-cypher-compiler-3.0</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -198,7 +198,7 @@

<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-compiler-2.3</artifactId>
<artifactId>neo4j-cypher-compiler-3.0</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
Expand Down
Expand Up @@ -19,7 +19,7 @@
*/
package org.neo4j.internal.cypher.acceptance

import org.neo4j.cypher.internal.compiler.v2_3.helpers.CollectionSupport
import org.neo4j.cypher.internal.compiler.v3_0.helpers.CollectionSupport
import org.neo4j.cypher.{ExecutionEngineFunSuite, QueryStatisticsTestSupport}
import org.neo4j.graphdb.Node
import org.scalatest.Assertions
Expand Down
Expand Up @@ -23,8 +23,8 @@ import java.io.{File, PrintWriter}
import java.net.{URLConnection, URLStreamHandler, URLStreamHandlerFactory, URL}

import org.neo4j.cypher._
import org.neo4j.cypher.internal.compiler.v2_3.test_helpers.CreateTempFileTestSupport
import org.neo4j.cypher.internal.frontend.v2_3.helpers.StringHelper.RichString
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
import org.neo4j.graphdb.security.URLAccessRule
import org.neo4j.kernel.GraphDatabaseAPI
Expand Down
Expand Up @@ -19,7 +19,7 @@
*/
package org.neo4j.internal.cypher.acceptance

import org.neo4j.cypher.internal.compiler.v2_3.commands.expressions.PathImpl
import org.neo4j.cypher.internal.compiler.v3_0.commands.expressions.PathImpl
import org.neo4j.cypher._
import org.neo4j.graphdb._

Expand Down
Expand Up @@ -20,7 +20,7 @@
package org.neo4j.internal.cypher.acceptance

import org.neo4j.cypher.{NewPlannerTestSupport, ExecutionEngineFunSuite}
import org.neo4j.cypher.internal.compiler.v2_3.test_helpers.CustomMatchers
import org.neo4j.cypher.internal.compiler.v3_0.test_helpers.CustomMatchers

class OrderByAcceptanceTest extends ExecutionEngineFunSuite with CustomMatchers with NewPlannerTestSupport {

Expand Down
Expand Up @@ -19,11 +19,11 @@
*/
package org.neo4j.internal.cypher.acceptance

import org.neo4j.cypher.internal.compiler.v2_3.commands.expressions.{NestedPipeExpression, PathImpl}
import org.neo4j.cypher.internal.compiler.v2_3.pipes.{ArgumentPipe, ExpandAllPipe, LazyTypes}
import org.neo4j.cypher.internal.compiler.v2_3.planDescription.InternalPlanDescription.Arguments.{EstimatedRows, LegacyExpression}
import org.neo4j.cypher.internal.compiler.v2_3.planner.BeLikeMatcher._
import org.neo4j.cypher.internal.frontend.v2_3.SemanticDirection
import org.neo4j.cypher.internal.compiler.v3_0.commands.expressions.{NestedPipeExpression, PathImpl}
import org.neo4j.cypher.internal.compiler.v3_0.pipes.{ArgumentPipe, ExpandAllPipe, LazyTypes}
import org.neo4j.cypher.internal.compiler.v3_0.planDescription.InternalPlanDescription.Arguments.{EstimatedRows, LegacyExpression}
import org.neo4j.cypher.internal.compiler.v3_0.planner.BeLikeMatcher._
import org.neo4j.cypher.internal.frontend.v3_0.SemanticDirection
import org.neo4j.cypher.{ExecutionEngineFunSuite, NewPlannerTestSupport}
import org.neo4j.graphdb.Relationship
import org.scalatest.Matchers
Expand Down
Expand Up @@ -22,9 +22,9 @@ package org.neo4j.internal.cypher.acceptance
import java.io.PrintWriter

import org.neo4j.cypher._
import org.neo4j.cypher.internal.compiler.v2_3.test_helpers.CreateTempFileTestSupport
import org.neo4j.cypher.internal.compiler.v3_0.test_helpers.CreateTempFileTestSupport
import org.neo4j.cypher.internal.helpers.TxCounts
import org.neo4j.cypher.internal.frontend.v2_3.helpers.StringHelper.RichString
import org.neo4j.cypher.internal.frontend.v3_0.helpers.StringHelper.RichString
import org.neo4j.graphdb.Node

class PeriodicCommitAcceptanceTest extends ExecutionEngineFunSuite
Expand Down
Expand Up @@ -19,8 +19,8 @@
*/
package org.neo4j.internal.cypher.acceptance

import org.neo4j.cypher.internal.compiler.v2_3.commands.expressions.PathImpl
import org.neo4j.cypher.internal.compiler.v2_3.test_helpers.CustomMatchers
import org.neo4j.cypher.internal.compiler.v3_0.commands.expressions.PathImpl
import org.neo4j.cypher.internal.compiler.v3_0.test_helpers.CustomMatchers
import org.neo4j.cypher.{ExecutionEngineFunSuite, NewPlannerTestSupport, SyntaxException}
import org.neo4j.graphdb._

Expand Down
Expand Up @@ -19,7 +19,7 @@
*/
package org.neo4j.internal.cypher.acceptance

import org.neo4j.cypher.internal.compiler.v2_3.commands.expressions.PathImpl
import org.neo4j.cypher.internal.compiler.v3_0.commands.expressions.PathImpl
import org.neo4j.cypher.{ExecutionEngineFunSuite, NewPlannerTestSupport, SyntaxException}
import org.neo4j.graphdb.Node

Expand Down
Expand Up @@ -19,7 +19,7 @@
*/
package org.neo4j.internal.cypher.acceptance

import org.neo4j.cypher.internal.compiler.v2_3.pipes.IndexSeekByRange
import org.neo4j.cypher.internal.compiler.v3_0.pipes.{IndexSeekByRange, UniqueIndexSeekByRange}
import org.neo4j.cypher.{ExecutionEngineFunSuite, NewPlannerTestSupport, QueryStatisticsTestSupport}
import org.neo4j.graphdb.{Node, ResourceIterator}

Expand Down
Expand Up @@ -19,10 +19,10 @@
*/
package org.neo4j.internal.cypher.acceptance

import org.neo4j.cypher.internal.compiler.v2_3.planDescription.InternalPlanDescription
import org.neo4j.cypher.internal.compiler.v2_3.planDescription.InternalPlanDescription.Arguments.KeyNames
import org.neo4j.cypher.internal.compiler.v2_3.planner.logical.plans.NodeHashJoin
import org.neo4j.cypher.internal.compiler.v2_3.{GreedyPlannerName, IDPPlannerName}
import org.neo4j.cypher.internal.compiler.v3_0.planDescription.InternalPlanDescription
import org.neo4j.cypher.internal.compiler.v3_0.planDescription.InternalPlanDescription.Arguments.KeyNames
import org.neo4j.cypher.internal.compiler.v3_0.planner.logical.plans.NodeHashJoin
import org.neo4j.cypher.internal.compiler.v3_0.{GreedyPlannerName, IDPPlannerName}
import org.neo4j.cypher.{ExecutionEngineFunSuite, HintException, IndexHintException, NewPlannerTestSupport, SyntaxException}
import org.scalatest.matchers.{MatchResult, Matcher}

Expand Down
2 changes: 1 addition & 1 deletion community/cypher/compatibility-suite/pom.xml
Expand Up @@ -156,7 +156,7 @@
<!-- neo4j-cypher -->
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-compiler-2.3</artifactId>
<artifactId>neo4j-cypher-compiler-3.0</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<exclusions>
Expand Down
Expand Up @@ -20,7 +20,7 @@
package cypher.cucumber.classifier

import com.novus.salat.annotations._
import org.neo4j.cypher.internal.compiler.v2_3.ast.QueryTag
import org.neo4j.cypher.internal.compiler.v3_0.ast.QueryTag

import scala.annotation.meta.getter

Expand Down
Expand Up @@ -28,7 +28,7 @@ import cucumber.runtime.xstream.LocalizedXStreams
import cucumber.runtime.{RuntimeGlue, RuntimeOptionsFactory, UndefinedStepsTracker}
import cypher.cucumber.DataTableConverter._
import gherkin.formatter.model.DocString
import org.neo4j.cypher.internal.compiler.v2_3.ast.QueryTagger
import org.neo4j.cypher.internal.compiler.v3_0.ast.QueryTagger

import scala.collection.JavaConverters._

Expand Down
Expand Up @@ -20,7 +20,7 @@
package cypher.cucumber.reporter

import com.novus.salat.annotations.{Ignore, Key, Persist}
import org.neo4j.cypher.internal.compiler.v2_3.ast.QueryTag
import org.neo4j.cypher.internal.compiler.v3_0.ast.QueryTag

import scala.annotation.meta.getter

Expand Down
Expand Up @@ -19,7 +19,7 @@
*/
package cypher.cucumber.reporter

import org.neo4j.cypher.internal.compiler.v2_3.ast.QueryTagger
import org.neo4j.cypher.internal.compiler.v3_0.ast.QueryTagger

import scala.collection.mutable

Expand Down

This file was deleted.

Expand Up @@ -9,19 +9,19 @@

<modelVersion>4.0.0</modelVersion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-compiler-2.3</artifactId>
<artifactId>neo4j-cypher-compiler-3.0</artifactId>
<packaging>jar</packaging>
<version>3.0.0-SNAPSHOT</version>
<name>Neo4j - Cypher Compiler 2.3</name>
<description>Compiler for Cypher 2.3</description>
<name>Neo4j - Cypher Compiler 3.0</name>
<description>Compiler for Cypher 3.0</description>
<url>http://components.neo4j.org/${project.artifactId}/${project.version}</url>

<scm>
<url>https://github.com/neo4j/neo4j/tree/master/community/cypher/cypher-compiler-2.2</url>
</scm>

<properties>
<version-package>cypher.internal.compiler.v2_3</version-package>
<version-package>cypher.internal.compiler.v3_0</version-package>
<scala.version>2.11.7</scala.version>
<scala.binary.version>2.11</scala.binary.version>
</properties>
Expand Down Expand Up @@ -132,12 +132,12 @@
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-frontend-2.3</artifactId>
<artifactId>neo4j-cypher-frontend-3.0</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-frontend-2.3</artifactId>
<artifactId>neo4j-cypher-frontend-3.0</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
</dependency>
Expand Down
Expand Up @@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package org.neo4j.cypher.internal.compiler.v2_3;
package org.neo4j.cypher.internal.compiler.v3_0;

public interface CompilationPhaseTracer
{
Expand Down
Expand Up @@ -17,9 +17,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compiler.v2_3.codegen;
package org.neo4j.cypher.internal.compiler.v3_0.codegen;

import org.neo4j.cypher.internal.compiler.v2_3.planDescription.Id;
import org.neo4j.cypher.internal.compiler.v3_0.planDescription.Id;

public interface QueryExecutionTracer
{
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compiler.v2_3.codegen;
package org.neo4j.cypher.internal.compiler.v3_0.codegen;

import java.util.HashMap;
import java.util.Map;
Expand Down
Expand Up @@ -18,14 +18,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package org.neo4j.cypher.internal.compiler.v2_3.codegen.profiling;
package org.neo4j.cypher.internal.compiler.v3_0.codegen.profiling;

import java.util.HashMap;
import java.util.Map;

import org.neo4j.cypher.internal.compiler.v2_3.codegen.QueryExecutionEvent;
import org.neo4j.cypher.internal.compiler.v2_3.codegen.QueryExecutionTracer;
import org.neo4j.cypher.internal.compiler.v2_3.planDescription.Id;
import org.neo4j.cypher.internal.compiler.v3_0.codegen.QueryExecutionEvent;
import org.neo4j.cypher.internal.compiler.v3_0.codegen.QueryExecutionTracer;
import org.neo4j.cypher.internal.compiler.v3_0.planDescription.Id;

public class ProfilingTracer implements QueryExecutionTracer
{
Expand Down
Expand Up @@ -17,14 +17,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compiler.v2_3.executionplan;
package org.neo4j.cypher.internal.compiler.v3_0.executionplan;

import java.util.Map;

import org.neo4j.cypher.internal.compiler.v2_3.ExecutionMode;
import org.neo4j.cypher.internal.compiler.v2_3.TaskCloser;
import org.neo4j.cypher.internal.compiler.v2_3.codegen.QueryExecutionTracer;
import org.neo4j.cypher.internal.compiler.v2_3.planDescription.InternalPlanDescription;
import org.neo4j.cypher.internal.compiler.v3_0.ExecutionMode;
import org.neo4j.cypher.internal.compiler.v3_0.TaskCloser;
import org.neo4j.cypher.internal.compiler.v3_0.codegen.QueryExecutionTracer;
import org.neo4j.cypher.internal.compiler.v3_0.planDescription.InternalPlanDescription;
import org.neo4j.function.Supplier;
import org.neo4j.kernel.api.Statement;
import org.neo4j.kernel.impl.core.NodeManager;
Expand Down
Expand Up @@ -17,12 +17,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compiler.v2_3.executionplan;
package org.neo4j.cypher.internal.compiler.v3_0.executionplan;

import java.util.List;

import org.neo4j.cypher.internal.compiler.v2_3.ExecutionMode;
import org.neo4j.cypher.internal.compiler.v2_3.planDescription.InternalPlanDescription;
import org.neo4j.cypher.internal.compiler.v3_0.ExecutionMode;
import org.neo4j.cypher.internal.compiler.v3_0.planDescription.InternalPlanDescription;
import org.neo4j.graphdb.Result;

public interface GeneratedQueryExecution
Expand Down
Expand Up @@ -17,17 +17,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compiler.v2_3
package org.neo4j.cypher.internal.compiler.v3_0

import org.neo4j.cypher.internal.compiler.v2_3.ast.conditions._
import org.neo4j.cypher.internal.compiler.v2_3.ast.rewriters._
import org.neo4j.cypher.internal.compiler.v2_3.tracing.rewriters.{ApplyRewriter, RewriterCondition, RewriterStepSequencer}
import org.neo4j.cypher.internal.frontend.v2_3.ast._
import org.neo4j.cypher.internal.frontend.v2_3.{Rewriter, SemanticState}
import org.neo4j.cypher.internal.compiler.v3_0.ast.conditions._
import org.neo4j.cypher.internal.compiler.v3_0.ast.rewriters._
import org.neo4j.cypher.internal.compiler.v3_0.tracing.rewriters.{ApplyRewriter, RewriterCondition, RewriterStepSequencer}
import org.neo4j.cypher.internal.frontend.v3_0.ast._
import org.neo4j.cypher.internal.frontend.v3_0.{Rewriter, SemanticState}

class ASTRewriter(rewriterSequencer: (String) => RewriterStepSequencer, shouldExtractParameters: Boolean = true) {

import org.neo4j.cypher.internal.compiler.v2_3.tracing.rewriters.RewriterStep._
import org.neo4j.cypher.internal.compiler.v3_0.tracing.rewriters.RewriterStep._

def rewrite(queryText: String, statement: Statement, semanticState: SemanticState): (Statement, Map[String, Any], Set[RewriterCondition]) = {
val (extractParameters, extractedParameters) = if (shouldExtractParameters)
Expand Down

0 comments on commit 150064a

Please sign in to comment.