Permalink
Browse files

Merged Cypher refactoring into master

Conflicts:
	cypher/CHANGES.txt
	cypher/src/main/scala/org/neo4j/cypher/internal/commands/ComparablePredicate.scala
	cypher/src/main/scala/org/neo4j/cypher/internal/commands/Expression.scala
	cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/builders/FilterBuilder.scala
	cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/Expressions.scala
	cypher/src/test/scala/org/neo4j/cypher/ErrorMessagesTest.scala
	cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/builders/SortBuilderTest.scala
	cypher/src/test/scala/org/neo4j/cypher/internal/pipes/aggregation/CollectFunctionTest.scala
	server/src/functionaltest/java/org/neo4j/server/rest/BatchOperationFunctionalTest.java
	server/src/main/java/org/neo4j/server/rest/repr/OutputFormat.java
	server/src/main/java/org/neo4j/server/rest/web/RestfulGraphDatabase.java
  • Loading branch information...
systay committed Sep 10, 2012
2 parents eb2e102 + 07f0f47 commit a1108c05c84ccfc5e5da9d513f4caddf7cc494f5
Showing with 5,029 additions and 3,007 deletions.
  1. +7 −0 cypher/CHANGES.txt
  2. +6 −0 cypher/pom.xml
  3. +2 −1 cypher/src/main/java/org/neo4j/cypher/javacompat/CypherParser.java
  4. +2 −2 cypher/src/main/scala/org/neo4j/cypher/CypherException.scala
  5. +4 −4 cypher/src/main/scala/org/neo4j/cypher/CypherParser.scala
  6. +2 −5 cypher/src/main/scala/org/neo4j/cypher/EagerPipeExecutionResult.scala
  7. +1 −1 cypher/src/main/scala/org/neo4j/cypher/ExecutionEngine.scala
  8. +0 −3 cypher/src/main/scala/org/neo4j/cypher/ExecutionResult.scala
  9. +4 −5 cypher/src/main/scala/org/neo4j/cypher/PipeExecutionResult.scala
  10. +4 −3 cypher/src/main/scala/org/neo4j/cypher/internal/ReattachAliasedExpressions.scala
  11. +0 −165 cypher/src/main/scala/org/neo4j/cypher/internal/commands/AggregationExpression.scala
  12. +21 −8 cypher/src/main/scala/org/neo4j/cypher/internal/commands/ComparablePredicate.scala
  13. +0 −278 cypher/src/main/scala/org/neo4j/cypher/internal/commands/Expression.scala
  14. +0 −245 cypher/src/main/scala/org/neo4j/cypher/internal/commands/Functions.scala
  15. +29 −23 cypher/src/main/scala/org/neo4j/cypher/internal/commands/{InIterable.scala → InCollection.scala}
  16. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/NamedPath.scala
  17. +27 −11 cypher/src/main/scala/org/neo4j/cypher/internal/commands/PathExpression.scala
  18. +57 −19 cypher/src/main/scala/org/neo4j/cypher/internal/commands/Pattern.scala
  19. +97 −52 cypher/src/main/scala/org/neo4j/cypher/internal/commands/Predicate.scala
  20. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/Query.scala
  21. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/QueryBuilder.scala
  22. +12 −21 cypher/src/main/scala/org/neo4j/cypher/internal/commands/ReturnItem.scala
  23. +6 −3 cypher/src/main/scala/org/neo4j/cypher/internal/commands/SortItem.scala
  24. +43 −26 cypher/src/main/scala/org/neo4j/cypher/internal/commands/StartItem.scala
  25. +67 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Add.scala
  26. +47 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/AggregationExpression.scala
  27. +33 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Avg.scala
  28. +7 −13 ...s/ExpressionTest.scala → main/scala/org/neo4j/cypher/internal/commands/expressions/Closure.scala}
  29. +52 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/CoalesceFunction.scala
  30. +33 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Collect.scala
  31. +48 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Collection.scala
  32. +33 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Count.scala
  33. +38 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/CountStar.scala
  34. +38 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Distinct.scala
  35. +32 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Divide.scala
  36. +108 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Expression.scala
  37. +48 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/ExtractFunction.scala
  38. +48 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/FilterFunction.scala
  39. +40 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/HeadFunction.scala
  40. +44 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/IdFunction.scala
  41. +45 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Identifier.scala
  42. +38 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/LastFunction.scala
  43. +48 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/LengthFunction.scala
  44. +40 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Literal.scala
  45. +22 −31 cypher/src/main/scala/org/neo4j/cypher/internal/commands/{ → expressions}/MathFunction.scala
  46. +33 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Max.scala
  47. +33 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Min.scala
  48. +7 −2 ...in/scala/org/neo4j/cypher/internal/{symbols/Identifier.scala → commands/expressions/Modulo.scala}
  49. +28 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Multiply.scala
  50. +48 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/NodesFunction.scala
  51. +35 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Null.scala
  52. +7 −7 ....scala → main/scala/org/neo4j/cypher/internal/commands/expressions/NullInNullOutExpression.scala}
  53. +43 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Nullable.scala
  54. +52 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/ParameterExpression.scala
  55. +28 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Pow.scala
  56. +56 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Property.scala
  57. +46 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/RelationshipFunction.scala
  58. +42 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/RelationshipTypeFunction.scala
  59. +13 −12 ...r/src/main/scala/org/neo4j/cypher/internal/commands/{ → expressions}/ShortestPathExpression.scala
  60. +28 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Subtract.scala
  61. +33 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/Sum.scala
  62. +38 −0 cypher/src/main/scala/org/neo4j/cypher/internal/commands/expressions/TailFunction.scala
  63. +4 −7 cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/ExecutionPlanImpl.scala
  64. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/PartiallySolvedQuery.scala
  65. +58 −44 cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/builders/AggregationBuilder.scala
  66. +13 −7 cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/builders/ColumnFilterBuilder.scala
  67. +17 −15 ...n/scala/org/neo4j/cypher/internal/executionplan/builders/CreateNodesAndRelationshipsBuilder.scala
  68. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/builders/EmptyResultBuilder.scala
  69. +15 −7 cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/builders/ExtractBuilder.scala
  70. +3 −15 cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/builders/FilterBuilder.scala
  71. +12 −7 cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/builders/MatchBuilder.scala
  72. +5 −5 cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/builders/NamedPathBuilder.scala
  73. +2 −5 cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/builders/ShortestPathBuilder.scala
  74. +13 −3 cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/builders/SortBuilder.scala
  75. +11 −7 cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/builders/UpdateActionBuilder.scala
  76. +48 −15 cypher/src/main/scala/org/neo4j/cypher/internal/mutation/CreateUniqueAction.scala
  77. +20 −5 cypher/src/main/scala/org/neo4j/cypher/internal/mutation/DeleteEntityAction.scala
  78. +9 −5 cypher/src/main/scala/org/neo4j/cypher/internal/mutation/DeletePropertyAction.scala
  79. +25 −21 cypher/src/main/scala/org/neo4j/cypher/internal/mutation/ForeachAction.scala
  80. +55 −0 cypher/src/main/scala/org/neo4j/cypher/internal/mutation/NamedExpectation.scala
  81. +9 −5 cypher/src/main/scala/org/neo4j/cypher/internal/mutation/PropertySetAction.scala
  82. +77 −34 cypher/src/main/scala/org/neo4j/cypher/internal/mutation/UniqueLink.scala
  83. +10 −5 cypher/src/main/scala/org/neo4j/cypher/internal/mutation/UpdateAction.scala
  84. +0 −73 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_6/CypherParserImpl.scala
  85. +0 −82 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_6/Expressions.scala
  86. +0 −168 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_6/MatchClause.scala
  87. +0 −124 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_6/Predicates.scala
  88. +0 −66 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_6/ReturnItems.scala
  89. +0 −93 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_6/StartClause.scala
  90. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_7/Base.scala
  91. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_7/ConsoleCypherParser.scala
  92. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_7/CypherParserImpl.scala
  93. +7 −7 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_7/Expressions.scala
  94. +2 −1 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_7/ReturnClause.scala
  95. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_7/SkipLimitClause.scala
  96. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_7/StartClause.scala
  97. +4 −3 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/AbstractPattern.scala
  98. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/Base.scala
  99. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/ConsoleCypherParser.scala
  100. +4 −3 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/CreateUnique.scala
  101. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/CypherParserImpl.scala
  102. +6 −5 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/Expressions.scala
  103. +5 −4 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/MatchClause.scala
  104. +5 −4 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/ParserPattern.scala
  105. +7 −6 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/Predicates.scala
  106. +2 −1 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/ReturnClause.scala
  107. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/SkipLimitClause.scala
  108. +2 −1 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/StartClause.scala
  109. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/StringLiteral.scala
  110. +2 −3 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/Updates.scala
  111. +127 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_9/AbstractPattern.scala
  112. +34 −7 cypher/src/main/scala/org/neo4j/cypher/internal/parser/{v1_6 → v1_9}/Base.scala
  113. +2 −2 cypher/src/main/scala/org/neo4j/cypher/internal/parser/{v1_6 → v1_9}/ConsoleCypherParser.scala
  114. +70 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_9/CreateUnique.scala
  115. +203 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_9/CypherParserImpl.scala
  116. +210 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_9/Expressions.scala
  117. +72 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_9/MatchClause.scala
  118. +4 −4 cypher/src/main/scala/org/neo4j/cypher/internal/parser/{v1_6 → v1_9}/OrderByClause.scala
  119. +247 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_9/ParserPattern.scala
  120. +92 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_9/Predicates.scala
  121. +34 −19 cypher/src/main/scala/org/neo4j/cypher/internal/parser/{v1_6 → v1_9}/ReturnClause.scala
  122. +2 −2 cypher/src/main/scala/org/neo4j/cypher/internal/parser/{v1_6 → v1_9}/SkipLimitClause.scala
  123. +176 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_9/StartClause.scala
  124. +94 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_9/StringLiteral.scala
  125. +54 −0 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_9/Updates.scala
  126. +2 −2 cypher/src/main/scala/org/neo4j/cypher/internal/parser/{v1_6 → v1_9}/WhereClause.scala
  127. +24 −17 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/ColumnFilterPipe.scala
  128. +6 −0 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/CommitPipe.scala
  129. +38 −25 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/EagerAggregationPipe.scala
  130. +7 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/EmptyResultPipe.scala
  131. +10 −6 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/ExecuteUpdateCommandsPipe.scala
  132. +20 −17 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/ExtractPipe.scala
  133. +4 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/FilterPipe.scala
  134. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/MatchPipe.scala
  135. +10 −6 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/NamedPathPipe.scala
  136. +0 −96 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/OrderedAggregationPipe.scala
  137. +2 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/ParameterPipe.scala
  138. +4 −9 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/PipeWithSource.scala
  139. +19 −27 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/ShortestPathPipe.scala
  140. +2 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/SlicePipe.scala
  141. +9 −8 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/SortPipe.scala
  142. +4 −5 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/StartPipe.scala
  143. +8 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/TransactionStartPipe.scala
  144. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/aggregation/AvgFunction.scala
  145. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/aggregation/CollectFunction.scala
  146. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/aggregation/CountFunction.scala
  147. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/aggregation/DistinctFunction.scala
  148. +2 −2 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/aggregation/MaxFunction.scala
  149. +2 −2 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/aggregation/NumericExpressionOnly.scala
  150. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/aggregation/SumFunction.scala
  151. +2 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/matching/JoinerBuilder.scala
  152. +5 −7 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/matching/MatchingContext.scala
  153. +5 −0 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/matching/PatternGraph.scala
  154. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/matching/PatternMatcher.scala
  155. +5 −7 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/matching/PatternRelationship.scala
  156. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/pipes/matching/SimplePatternMatcherBuilder.scala
  157. +1 −1 ...rc/main/scala/org/neo4j/cypher/internal/symbols/{AnyIterableType.scala → AnyCollectionType.scala}
  158. +7 −26 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/AnyType.scala
  159. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/BooleanType.scala
  160. +11 −29 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/CollectionType.scala
  161. +97 −0 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/CypherType.scala
  162. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/DoubleType.scala
  163. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/IntegerType.scala
  164. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/LongType.scala
  165. +2 −1 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/MapType.scala
  166. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/NodeType.scala
  167. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/NumberType.scala
  168. +1 −1 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/RelationshipType.scala
  169. +2 −2 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/ScalarType.scala
  170. +1 −0 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/StringType.scala
  171. +23 −96 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/SymbolTable.scala
  172. +33 −0 cypher/src/main/scala/org/neo4j/cypher/internal/symbols/type_system.txt
  173. +33 −0 cypher/src/test/scala/org/neo4j/cypher/CreateUniqueAcceptanceTests.scala
  174. +225 −366 cypher/src/test/scala/org/neo4j/cypher/CypherParserTest.scala
  175. +16 −1 cypher/src/test/scala/org/neo4j/cypher/ErrorMessagesTest.scala
  176. +63 −66 cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTest.scala
  177. +0 −3 cypher/src/test/scala/org/neo4j/cypher/MutatingIntegrationTests.scala
  178. +2 −2 cypher/src/test/scala/org/neo4j/cypher/SemanticErrorTest.scala
  179. +0 −1 cypher/src/test/scala/org/neo4j/cypher/docgen/FunctionsTest.scala
  180. +14 −14 cypher/src/test/scala/org/neo4j/cypher/docgen/cookbook/PeopleSimilarityFavoritesTest.scala
  181. +3 −2 cypher/src/test/scala/org/neo4j/cypher/docgen/cookbook/PeopleSimilarityTagsTest.scala
  182. +3 −2 cypher/src/test/scala/org/neo4j/cypher/internal/ReattachAliasedExpressionsTest.scala
  183. +1 −0 cypher/src/test/scala/org/neo4j/cypher/internal/commands/AddTest.scala
  184. +11 −6 cypher/src/test/scala/org/neo4j/cypher/internal/commands/AllIdentifiersTest.scala
  185. +9 −7 cypher/src/test/scala/org/neo4j/cypher/internal/commands/CoalesceTest.scala
  186. +3 −5 cypher/src/test/scala/org/neo4j/cypher/internal/commands/ExtractTest.scala
  187. +4 −3 cypher/src/test/scala/org/neo4j/cypher/internal/commands/HasRelationshipTest.scala
  188. +5 −0 cypher/src/test/scala/org/neo4j/cypher/internal/commands/MathFunctionsTest.scala
  189. +1 −0 cypher/src/test/scala/org/neo4j/cypher/internal/commands/PathExpressionTest.scala
  190. +1 −0 cypher/src/test/scala/org/neo4j/cypher/internal/commands/PropertyValueTests.scala
  191. +3 −2 cypher/src/test/scala/org/neo4j/cypher/internal/commands/SeqPredicateTests.scala
  192. +1 −0 cypher/src/test/scala/org/neo4j/cypher/internal/commands/SplittingPredicateTest.scala
  193. +1 −0 cypher/src/test/scala/org/neo4j/cypher/internal/commands/SubtractTest.scala
  194. +120 −0 cypher/src/test/scala/org/neo4j/cypher/internal/commands/expressions/ExpressionTest.scala
  195. +3 −2 cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/ExecutionPlanImplTest.scala
  196. +10 −4 cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/builders/AggregationBuilderTest.scala
  197. +6 −6 cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/builders/BuilderTest.scala
  198. +2 −1 cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/builders/ColumnFilterBuilderTest.scala
  199. +5 −4 ...ala/org/neo4j/cypher/internal/executionplan/builders/CreateNodesAndRelationshipsBuilderTest.scala
  200. +4 −4 ...test/scala/org/neo4j/cypher/internal/executionplan/builders/DeleteAndPropertySetBuilderTest.scala
  201. +2 −1 cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/builders/ExtractBuilderTest.scala
  202. +2 −1 cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/builders/FilterBuilderTest.scala
  203. +2 −1 ...src/test/scala/org/neo4j/cypher/internal/executionplan/builders/GraphGlobalStartBuilderTest.scala
  204. +1 −0 cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/builders/IndexQueryBuilderTest.scala
  205. +2 −1 cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/builders/NodeByIdBuilderTest.scala
  206. +2 −1 cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/builders/ShortestPathBuilderTest.scala
  207. +2 −1 cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/builders/SliceBuilderTest.scala
  208. +11 −6 cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/builders/SortBuilderTest.scala
  209. +2 −1 cypher/src/test/scala/org/neo4j/cypher/internal/mutation/CreateNodeActionTest.scala
  210. +0 −1 cypher/src/test/scala/org/neo4j/cypher/internal/mutation/PropertySetActionTest.scala
  211. +2 −1 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/AllShortestPathsPipeTest.scala
  212. +6 −6 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/ColumnFilterPipeTest.scala
  213. +27 −14 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/EagerAggregationPipeTest.scala
  214. +34 −0 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/FakePipe.scala
  215. +12 −9 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/MutationTest.scala
  216. +0 −102 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/OrderedAggregationPipeTest.scala
  217. +5 −3 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/SingleShortestPathPipeTest.scala
  218. +35 −45 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/SortPipeTest.scala
  219. +2 −2 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/aggregation/AggregateTest.scala
  220. +1 −1 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/aggregation/AvgFunctionTest.scala
  221. +1 −1 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/aggregation/CollectFunctionTest.scala
  222. +1 −1 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/aggregation/CountTest.scala
  223. +1 −1 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/aggregation/MaxFunctionTest.scala
  224. +1 −1 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/aggregation/MinFunctionTest.scala
  225. +1 −1 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/aggregation/SumFunctionTest.scala
  226. +17 −21 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/matching/MatchingContextTest.scala
  227. +78 −29 cypher/src/test/scala/org/neo4j/cypher/internal/symbols/SymbolTableTest.scala
  228. +10 −10 kernel/src/main/java/org/neo4j/graphdb/index/UniqueFactory.java
  229. +147 −0 kernel/src/test/java/org/neo4j/graphdb/index/UniqueFactoryTest.java
  230. +0 −1 server/src/functionaltest/java/org/neo4j/server/rest/BatchOperationFunctionalTest.java
View
@@ -1,3 +1,10 @@
+1.9
+--------------------
+o Refactored the type system from the bottom up
+o Predicates can now be returned and used to set properties
+o Fixes #797: CREATE UNIQUE now makes sure used identifiers have the same properties even if
+ they are re-used without the properties
+
1.8.RC1 (2012-09-05)
--------------------
o Removed the /../ literal for regular expressions. Now a normal string literal is used instead
View
@@ -125,6 +125,12 @@
<phase>process-test-resources</phase>
</execution>
</executions>
+ <configuration>
+ <jvmArgs>
+ <jvmArg>-Xms64m</jvmArg>
+ <jvmArg>-Xmx1024m</jvmArg>
+ </jvmArgs>
+ </configuration>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
@@ -45,7 +45,8 @@ public static Query parseStrict(String query) throws SyntaxException {
return new org.neo4j.cypher.CypherParser().parse( query );
}
+ @Deprecated
public static Query parseConsole(String query) throws SyntaxException {
- return new org.neo4j.cypher.internal.parser.v1_6.ConsoleCypherParser().parse( query );
+ return new org.neo4j.cypher.CypherParser().parse( query );
}
}
@@ -19,7 +19,7 @@
*/
package org.neo4j.cypher
-import internal.commands.Expression
+import internal.commands.expressions.Expression
abstract class CypherException(message: String, cause: Throwable) extends RuntimeException(message, cause) {
def this(message:String) = this(message, null)
@@ -33,7 +33,7 @@ class CypherTypeException(message: String, cause: Throwable = null) extends Cyph
class IterableRequiredException(message:String, cause:Throwable) extends CypherException(message, cause) {
def this(message:String) = this(message, null)
- def this(expression:Expression) = this("Expected " + expression.identifier.name + " to be a collection, but it is not.", null)
+ def this(expression:Expression) = this("Expected " + expression + " to be an collection, but it is not.", null)
}
class ParameterNotFoundException(message:String, cause:Throwable) extends CypherException(message, cause) {
@@ -22,13 +22,13 @@ package org.neo4j.cypher
import internal.commands.Query
class CypherParser(version: String) {
- def this() = this ("1.8")
+ def this() = this("1.9")
val hasVersionDefined = """(?si)^\s*cypher\s*([^\s]+)\s*(.*)""".r
- val v16 = new internal.parser.v1_6.CypherParserImpl
val v17 = new internal.parser.v1_7.CypherParserImpl
val v18 = new internal.parser.v1_8.CypherParserImpl
+ val v19 = new internal.parser.v1_9.CypherParserImpl
@throws(classOf[SyntaxException])
def parse(queryText: String): Query = {
@@ -39,10 +39,10 @@ class CypherParser(version: String) {
}
v match {
- case "1.6" => v16.parse(q)
case "1.7" => v17.parse(q)
case "1.8" => v18.parse(q)
- case _ => throw new SyntaxException("Versions supported are 1.6, 1.7 and 1.8")
+ case "1.9" => v19.parse(q)
+ case _ => throw new SyntaxException("Versions supported are 1.7, 1.8 and 1.9")
}
}
}
@@ -20,17 +20,14 @@
package org.neo4j.cypher
import internal.pipes.QueryState
-import internal.symbols.SymbolTable
-import org.neo4j.graphdb.{Transaction, GraphDatabaseService}
-import org.neo4j.kernel.GraphDatabaseAPI
+import org.neo4j.graphdb.GraphDatabaseService
import collection.Map
class EagerPipeExecutionResult(r: => Traversable[Map[String, Any]],
- symbols: SymbolTable,
columns: List[String],
state: QueryState,
db: GraphDatabaseService)
- extends PipeExecutionResult(r, symbols, columns) {
+ extends PipeExecutionResult(r, columns) {
override lazy val queryStatistics = QueryStatistics(
nodesCreated = state.createdNodes.count,
@@ -40,7 +40,7 @@ class ExecutionEngine(graph: GraphDatabaseService) {
val database = graph.asInstanceOf[InternalAbstractGraphDatabase]
database.getConfig.getParams.asScala.get("cypher_parser_version") match {
case None => new CypherParser()
- case Some(v) => new CypherParser(v.toString)
+ case Some(v) => new CypherParser(v)
}
}
else {
@@ -21,12 +21,9 @@ package org.neo4j.cypher
import java.io.PrintWriter
import java.lang.String
-import internal.symbols.SymbolTable
-
trait ExecutionResult extends Iterator[Map[String, Any]] {
def columns: List[String]
- def symbols: SymbolTable
def javaColumns: java.util.List[String]
def javaColumnAs[T](column: String): java.util.Iterator[T]
def columnAs[T](column: String): Iterator[T]
@@ -19,20 +19,19 @@
*/
package org.neo4j.cypher
-import internal.commands.{IterableSupport, IsIterable}
+import internal.commands.{CollectionSupport, IsCollection}
import internal.StringExtras
import scala.collection.JavaConverters._
import org.neo4j.graphdb.{PropertyContainer, Relationship, Node}
import java.io.{StringWriter, PrintWriter}
import java.lang.String
-import internal.symbols.SymbolTable
import collection.Map
import collection.immutable.{Map => ImmutableMap}
-class PipeExecutionResult(r: => Traversable[Map[String, Any]], val symbols: SymbolTable, val columns: List[String])
+class PipeExecutionResult(r: => Traversable[Map[String, Any]], val columns: List[String])
extends ExecutionResult
with StringExtras
- with IterableSupport {
+ with CollectionSupport {
lazy val immutableResult = r.map(m => m.toMap)
@@ -134,7 +133,7 @@ class PipeExecutionResult(r: => Traversable[Map[String, Any]], val symbols: Symb
private def text(obj: Any): String = obj match {
case x: Node => x.toString + props(x)
case x: Relationship => ":" + x.getType.toString + "[" + x.getId + "] " + props(x)
- case IsIterable(coll) => coll.map(text).mkString("[", ",", "]")
+ case IsCollection(coll) => coll.map(text).mkString("[", ",", "]")
case x: String => "\"" + x + "\""
case Some(x) => x.toString
case null => "<null>"
@@ -20,6 +20,7 @@
package org.neo4j.cypher.internal
import commands._
+import expressions.{Identifier, Expression}
/*
@@ -38,15 +39,15 @@ object ReattachAliasedExpressions {
}
private def expressionRewriter(returnColumns: Seq[ReturnColumn])(expression: Expression): Expression = expression match {
- case e: Entity => {
+ case e@Identifier(entityName) =>
val returnItems = keepReturnItems(returnColumns)
val found = returnItems.find(_.name == e.entityName)
found match {
- case None => e
+ case None => e
case Some(returnItem) => returnItem.expression
}
- }
+
case somethingElse => somethingElse
}
@@ -1,165 +0,0 @@
-/**
- * Copyright (c) 2002-2012 "Neo Technology,"
- * Network Engine for Objects in Lund AB [http://neotechnology.com]
- *
- * This file is part of Neo4j.
- *
- * Neo4j is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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.commands
-
-import collection.Seq
-import org.neo4j.cypher.internal.pipes.aggregation._
-import org.neo4j.cypher.internal.symbols._
-import org.neo4j.cypher.SyntaxException
-import collection.Map
-abstract class AggregationExpression extends Expression {
- def compute(m: Map[String, Any]) = m.get(name) match {
- case None => null
- case Some(x) => x
- }
-
- override val identifier = Identifier(name, typ)
-
- def name: String
-
- def typ: AnyType
-
- def createAggregationFunction: AggregationFunction
-}
-
-case class CountStar() extends AggregationExpression {
- def name = "count(*)"
-
- def typ = LongType()
-
- def declareDependencies(extectedType: AnyType) = Seq()
-
- def rewrite(f: (Expression) => Expression) = f(CountStar())
-
- def createAggregationFunction = new CountStarFunction
-
- def filter(f: (Expression) => Boolean) = if (f(this))
- Seq(this)
- else
- Seq()
-
- override def toString() = "count(*)"
-}
-
-abstract class AggregationWithInnerExpression(inner:Expression) extends AggregationExpression {
- if(inner.containsAggregate)
- throw new SyntaxException("Can't use aggregate functions inside of aggregate functions.")
-
- def declareDependencies(extectedType: AnyType): Seq[Identifier] = inner.dependencies(expectedInnerType)
- def expectedInnerType: AnyType
-
- override val identifier = Identifier("%s(%s)".format(name, inner.identifier.name), typ)
-
- def filter(f: (Expression) => Boolean) = if (f(this))
- Seq(this) ++ inner.filter(f)
- else
- inner.filter(f)
-}
-
-case class Distinct(innerAggregator: AggregationExpression, expression: Expression) extends AggregationWithInnerExpression(expression) {
- def typ = innerAggregator.identifier.typ
-
- override val identifier = Identifier("%s(distinct %s)".format(innerAggregator.name, expression.identifier.name), innerAggregator.identifier.typ)
-
- def expectedInnerType: AnyType = AnyType()
-
- def name = "distinct"
-
- def createAggregationFunction = new DistinctFunction(expression, innerAggregator.createAggregationFunction)
-
- override def declareDependencies(extectedType: AnyType): Seq[Identifier] = innerAggregator.dependencies(extectedType) ++ expression.dependencies(AnyType())
-
- def rewrite(f: (Expression) => Expression) = innerAggregator.rewrite(f) match {
- case inner: AggregationExpression => f(Distinct(inner, expression.rewrite(f)))
- case _ => f(Distinct(innerAggregator, expression.rewrite(f)))
- }
-}
-
-case class Count(anInner: Expression) extends AggregationWithInnerExpression(anInner) {
- def typ = IntegerType()
-
- def name = "count"
-
- def createAggregationFunction = new CountFunction(anInner)
-
- def expectedInnerType: AnyType = AnyType()
-
- def rewrite(f: (Expression) => Expression) = f(Count(anInner.rewrite(f)))
-}
-
-case class Sum(anInner: Expression) extends AggregationWithInnerExpression(anInner) {
- def typ = NumberType()
-
- def name = "sum"
-
- def createAggregationFunction = new SumFunction(anInner)
-
- def expectedInnerType: AnyType = NumberType()
-
- def rewrite(f: (Expression) => Expression) = f(Sum(anInner.rewrite(f)))
-}
-
-case class Min(anInner: Expression) extends AggregationWithInnerExpression(anInner) {
- def typ = NumberType()
-
- def name = "min"
-
- def createAggregationFunction = new MinFunction(anInner)
-
- def expectedInnerType: AnyType = NumberType()
-
- def rewrite(f: (Expression) => Expression) = f(Min(anInner.rewrite(f)))
-}
-
-case class Max(anInner: Expression) extends AggregationWithInnerExpression(anInner) {
- def typ = NumberType()
-
- def name = "max"
-
- def createAggregationFunction = new MaxFunction(anInner)
-
- def expectedInnerType: AnyType = NumberType()
-
- def rewrite(f: (Expression) => Expression) = f(Max(anInner.rewrite(f)))
-}
-
-case class Avg(anInner: Expression) extends AggregationWithInnerExpression(anInner) {
- def typ = NumberType()
-
- def name = "avg"
-
- def createAggregationFunction = new AvgFunction(anInner)
-
- def expectedInnerType: AnyType = NumberType()
-
- def rewrite(f: (Expression) => Expression) = f(Avg(anInner.rewrite(f)))
-}
-
-case class Collect(anInner: Expression) extends AggregationWithInnerExpression(anInner) {
- def typ = new CollectionType(anInner.identifier.typ)
-
- def name = "collect"
-
- def createAggregationFunction = new CollectFunction(anInner)
-
- def expectedInnerType: AnyType = AnyType()
-
- def rewrite(f: (Expression) => Expression) = f(Collect(anInner.rewrite(f)))
-}
Oops, something went wrong.

0 comments on commit a1108c0

Please sign in to comment.