Class ToCypherFormatStringVisitor

  • All Implemented Interfaces:
    com.querydsl.core.types.Visitor<String,​CypherContext>

    @API(status=INTERNAL,
         since="2021.1.0")
    public final class ToCypherFormatStringVisitor
    extends Object
    implements com.querydsl.core.types.Visitor<String,​CypherContext>
    This is basically a copy of Query-DSL's ToStringVisitor. The main purpose of the string generated here is to be used with our Cypher.raw(String, Object...) feature, that allows to insert arbitrary query fragments into the AST. It is easier to render the Query-DSL fragments than recreating our AST from Query-DSL.

    The main difference in the original ToStringVisitor is to be found in visit(ParamExpression, CypherContext) and visit(Constant, CypherContext). Both methods will use the $E notation to indicate an expression for the RawLiteral and add the expression (either a literal or parameter) to the CypherContext. After all rendering has been done by Query-DSL, the adapter will take the renderer string as a format string and pass it on to Cypher.raw(String, Object...) along with all expressions collected along the way.

    Since:
    2021.1.0
    Author:
    Michael J. Simons