Package org.neo4j.cypherdsl.core
Contains an internal DSL for creating Cypher. This API is in an experimental status at the moment and might change
without further notice.
While we have extensive tests in place to check that queries SDN needs are correctly generated, the AST itself is not validated for type errors. That is, one could misuse the DSL here to create an AST that renders to a syntactically correct Cypher statement, that will explode during runtime. For example using wrongly typed expression (an expression referencing a list while a map is needed or something like that).
With this in mind, please use this DSL consciously if you find it useful. It won't go away anytime soon, but might change in ways that break your code without further notice.
- Author:
- Michael J. Simons
-
Interface Summary Interface Description Aliased An element with an alias.Case.CaseEnding Specification for a renderable, complete CASE statementCondition Shared interface for all conditions.ExposesCall<T> Entrypoint for building procedure calls.ExposesCall.ExposesWithArgs<T> Used to provide arguments to procedure calls.ExposesCall.ExposesYield<T> Used to yield procedure result fields.ExposesCreate A step exposing aExposesCreate.create(PatternElement...)method.ExposesLogicalOperators<T> A step exposing logical operatorsandandorafter awhereclause.ExposesMatch A step exposing aExposesMatch.match(PatternElement...)method.ExposesMerge A step exposing aExposesMerge.merge(PatternElement...)method.ExposesProperties<T extends ExposesProperties<?> & PropertyContainer> A container that exposes methods to add properties with values to nodes or relationships.ExposesRelationships<T extends RelationshipPattern> A marker interface for things that expose methods to create new relationships to other elements.ExposesReturning Return part of a statement.ExposesUnwind A step exposing aExposesUnwind.unwind(Expression...),ExposesUnwind.unwind(Expression),ExposesUnwind.unwind(String)and method.ExposesWhere A step exposing a severalwheremethods that are provide entry points of adding conditions.Expression An expression can be used in many places, i.e.ListComprehension.OngoingDefinitionWithList Allows to add a where clause into the definition of the list.ListComprehension.OngoingDefinitionWithoutReturn Provides the final step of defining a list comprehension.ListComprehension.OngoingDefinitionWithVariable ListComprehension.OngoingDefinitionWithVariable.in(Expression)must be used to define the source list.Named A named thing exposes an optionalsymbolic name.NamedPath.OngoingDefinitionWithName Partial path that has a name (p =).NamedPath.OngoingShortestPathDefinitionWithName Partial path that has a name (p =) and is based on a graph algorithm function.PatternComprehension.OngoingDefinitionWithoutReturn Provides the final step of defining a pattern comprehension.PatternComprehension.OngoingDefinitionWithPattern Allows to add a where clause into the definition of the pattern.PatternComprehension.OngoingDefinitionWithPatternAndWhere Intermediate step that allows expressing additional, logical operators.PatternElement See PatternElement.Predicates.OngoingListBasedPredicateFunction Allows to define the source of the list predicate.Predicates.OngoingListBasedPredicateFunctionWithList Allows to specify the where condition for the list based predicate.ProcedureCall.OngoingInQueryCallWithArguments The union of an in-query call exposing yields.ProcedureCall.OngoingInQueryCallWithoutArguments The union of an in-query call exposing new arguments and yields.ProcedureCall.OngoingInQueryCallWithReturnFields An in-query call exposing where and return clauses.ProcedureCall.OngoingStandaloneCallWithArguments The union of a buildable statement and call exposing yields.ProcedureCall.OngoingStandaloneCallWithoutArguments The union of a buildable statement and call exposing new arguments and yields.ProcedureCall.OngoingStandaloneCallWithReturnFields A buildable statement exposing where and return clauses.PropertyContainer A container having properties.RelationshipPattern A shared, public interface forrelationshipsandchains of relationships.Statement Shall be the common interfaces for queries that we support.Statement.RegularQuery RepresentsRegularQuery.Statement.SingleQuery Represents aSingleQuery.StatementBuilder StatementBuilder.BuildableStatement A statement that has all information required to be build and exposes a build method.StatementBuilder.ExposesDelete A step that exposes only the delete clause.StatementBuilder.ExposesLimit A step that exposes theStatementBuilder.ExposesLimit.limit(Number)method.StatementBuilder.ExposesOrderBy SeeStatementBuilder.TerminalExposesOrderBy, but on a with clause.StatementBuilder.ExposesSet Set part of a statement.StatementBuilder.ExposesSetAndRemove A step that exposes the set clause.StatementBuilder.ExposesSkip A step that exposes theStatementBuilder.ExposesSkip.skip(Number)method.StatementBuilder.ExposesUpdatingClause A step providing all the supported updating clauses (DELETE, SET)StatementBuilder.ExposesWith A step that exposes theWITHclause.StatementBuilder.OngoingMatchAndReturnWithOrder Combines the capabilities of skip, limit and adds additional expressions to the order-by items.StatementBuilder.OngoingMatchAndUpdate A buildable step that will create a MATCH ...StatementBuilder.OngoingOrderDefinition An intermediate step while defining the order of a with clause.StatementBuilder.OngoingReading A match that exposesreturningand for which it is not decided whether the optional where part has been used or note.StatementBuilder.OngoingReadingAndReturn A match that knows what to return and which is ready to be build.StatementBuilder.OngoingReadingAndWith Represents a reading statement ending in a with clause, potentially already having an order and not exposing order methods.StatementBuilder.OngoingReadingAndWithWithWhereAndOrder Combines the capabilities of skip, limit and adds additional expressions to the order-by items.StatementBuilder.OngoingReadingWithoutWhere A match that exposesreturningandwheremethods to add required information.StatementBuilder.OngoingReadingWithWhere A match that has a non-emptywhere-part.StatementBuilder.OngoingUnwind Builder part for unwinding.StatementBuilder.OngoingUpdate An ongoing update statement that can be used to chain more update statements or add a with or return clause.StatementBuilder.OrderableOngoingReadingAndWith StatementBuilder.OrderableOngoingReadingAndWithWithoutWhere A match that knows what to pipe to the next part of a multi part query.StatementBuilder.OrderableOngoingReadingAndWithWithWhere StatementBuilder.TerminalExposesLimit A step that exposes theStatementBuilder.TerminalExposesLimit.limit(Number)method.StatementBuilder.TerminalExposesOrderBy A step that exposes several methods to specify ordering.StatementBuilder.TerminalExposesSkip A step that exposes theStatementBuilder.TerminalExposesSkip.skip(Number)method.StatementBuilder.TerminalOngoingOrderDefinition An intermediate step while defining the order of a result set. -
Class Summary Class Description AliasedExpression An aliased expression, that deals with named expressions when accepting visitors.Arguments Specialized list of expressions that represents the arguments of a procedure call.Asterisk The*.BooleanLiteral The boolean literal.Case See CaseExpression.Case.GenericCase Implementation of theCaseclass to support generic case.Case.GenericCase.EndingGenericCase The renderable implementation ofCase.GenericCase.Case.SimpleCase Special implementation of theCaseclass to support simple case with an initial expression / condition.Case.SimpleCase.EndingSimpleCase The renderable implementation ofCase.SimpleCase.Comparison A concrete condition representing a comparision between two expressions.CompoundCondition A condition that consists of one or twoconditionsconnected by a Logical connective (operator).Conditions Builder for various conditions.ConstantCondition A constant condition that is either always true or false.Create See Create.Cypher The main entry point into the Cypher DSL.Delete See Delete.FunctionInvocation Functions Factory methods for creating instances offunctions.HasLabelCondition A condition checking for the presence of labels on nodes.KeyValueMapEntry Helper class, only for internal use.Limit ListComprehension ListExpression Represents a list expression as in[expression1, expression2, ..., expressionN]ListLiteral A list of literals.ListOperator Represents a range literal applied to another expression.ListOperator.Details This is not a public API and just used internally for structuring the tree.Literal<T> Represents a literal with an optional content.MapExpression A dedicated map expression.MapProjection Represents a map projection as described here.Match See Match.Merge See Create.MultiPartQuery See MultiPartQuery.NamedPath Represents a named named path as inp := (a)-->(b).Namespace NestedExpression Node See NodePattern.NodeLabel Expression for a single Node label.NotCondition A negated version of the condition passed during construction of this condition.NullLiteral Represents the literal value null.NumberLiteral Operation A binary operation.Order Represents the list of sort items that make up the order of records in a result set.Parameter Represents a named parameter inside a Cypher statement.Pattern A pattern is something that can be matched.PatternComprehension Predicates Factory methods for creating predicates.ProcedureCall See StandaloneCall.ProcedureCall.Builder ProcedureCall.StandaloneCallBuilder ProcedureName Properties Represents the properties of anodeor arelationship.Property A property that belongs to a property container (either Node or Relationship).PropertyLookup See PropertyLookupRelationship See RelationshipPattern.Relationship.Details See RelationshipDetail.RelationshipChain Represents a chain of relationships.RelationshipLength Expresses the length of a relationship.RelationshipTypes Remove See Remove.Return See Return.ReturnBody The container or "body" for return items, order and optional skip and things.Set See Set.SinglePartQuery See SinglePartQuery.Skip SortItem StringLiteral The string representation of a string literal will be a quoted Cypher string in single tickmarks with escaped reserved characters.SymbolicName A symbolic name to identify nodes, relationships and aliased items.UnionPart Represents a part of an union.UnionQuery Unwind See Unwind.Where Roughly corresponding to Where.With See With.YieldItems Items yielded by a stand alone or in query call. -
Enum Summary Enum Description Distinct AST representation of the DISTINCT keyword.Operator An operator.Operator.Type Operatortype.Relationship.Direction While the direction in the schema package is centered around the node, the direction here is the direction between two nodes.SortItem.Direction Sort direction.