package rewriters
- Alphabetic
- Public
- All
Type Members
-
trait
Anonymizer extends AnyRef
Anonymizer which renames tokens and cypher parts using some scheme.
Anonymizer which renames tokens and cypher parts using some scheme. All renames have to be reproducible and unique to create a valid query.
The intended usage of this rewriter is for anonymizing queries before storage, to avoid retaining domain specific information which could harm the operation or integrity of the original cypher deployment. This anonymization would execucted by 1) parsing the query, 2) running the rewriter, and 3) writing the query back to string form using the Prettifier.
- case class InliningContext(projections: Map[LogicalVariable, Expression] = Map.empty, seenVariables: Set[LogicalVariable] = Set.empty, usageCount: Map[LogicalVariable, Int] = Map.empty) extends Product with Serializable
- sealed trait LiteralExtraction extends AnyRef
- abstract class MatchPredicateNormalization extends Rewriter
- trait MatchPredicateNormalizer extends AnyRef
- case class MatchPredicateNormalizerChain(normalizers: MatchPredicateNormalizer*) extends MatchPredicateNormalizer with Product with Serializable
- case class anonymizeQuery(anonymizer: Anonymizer) extends Rewriter with Product with Serializable
- case class deMorganRewriter()(implicit monitor: AstRewritingMonitor) extends Rewriter with Product with Serializable
- case class desugarMapProjection(state: SemanticState) extends Rewriter with Product with Serializable
- case class distributeLawsRewriter()(implicit monitor: AstRewritingMonitor) extends Rewriter with Product with Serializable
- case class expandStar(state: SemanticState) extends Rewriter with Product with Serializable
- case class normalizeMatchPredicates(getDegreeRewriting: Boolean) extends MatchPredicateNormalization with Product with Serializable
-
case class
normalizeWithAndReturnClauses(mkException: (String, InputPosition) ⇒ CypherException) extends Rewriter with Product with Serializable
This rewriter normalizes the scoping structure of a query, ensuring it is able to be correctly processed for semantic checking.
This rewriter normalizes the scoping structure of a query, ensuring it is able to be correctly processed for semantic checking. It makes sure that all return items in WITH clauses are aliased.
It also replaces expressions and subexpressions in ORDER BY and WHERE to use aliases introduced by the WITH, where possible.
Example:
MATCH n WITH n.prop AS prop ORDER BY n.prop DESC RETURN prop
This rewrite will change the query to:
MATCH n WITH n.prop AS prop ORDER BY prop DESC RETURN prop AS prop
- case class recordScopes(semanticState: SemanticState) extends Rewriter with Product with Serializable
- case class repeatWithSizeLimit(rewriter: Rewriter)(implicit monitor: AstRewritingMonitor) extends Rewriter with Product with Serializable
- case class replaceAliasedFunctionInvocations(deprecations: Deprecations) extends Rewriter with Product with Serializable
Value Members
- object Forced extends LiteralExtraction with Product with Serializable
- object IfNoParameter extends LiteralExtraction with Product with Serializable
- object InliningContext extends Serializable
- object LabelPredicateNormalizer extends MatchPredicateNormalizer
- object Never extends LiteralExtraction with Product with Serializable
- object PatternExpressionPatternElementNamer
- object PropertyPredicateNormalizer extends MatchPredicateNormalizer
- object addUniquenessPredicates extends Rewriter with Product with Serializable
- object calculateUsingGetDegree
- object collapseMultipleInPredicates extends Rewriter with Product with Serializable
- object copyVariables extends Rewriter with Product with Serializable
- object distributeLawsRewriter extends Serializable
- object expandCallWhere extends Rewriter with Product with Serializable
- object flattenBooleanOperators extends Rewriter
- object foldConstants extends Rewriter with Product with Serializable
- object inlineNamedPathsInPatternComprehensions extends Rewriter with Product with Serializable
- object inlineProjections extends Rewriter with Product with Serializable
- object inliningContextCreator extends (Statement) ⇒ InliningContext
- object literalReplacement
-
object
mergeInPredicates extends Rewriter with Product with Serializable
Merges multiple IN predicates into one.
Merges multiple IN predicates into one.
Examples: MATCH (n) WHERE n.prop IN [1,2,3] AND [2,3,4] RETURN n.prop -> MATCH (n) WHERE n.prop IN [2,3]
MATCH (n) WHERE n.prop IN [1,2,3] OR [2,3,4] RETURN n.prop -> MATCH (n) WHERE n.prop IN [1,2,3,4]
MATCH (n) WHERE n.prop IN [1,2,3] AND [4,5,6] RETURN n.prop -> MATCH (n) WHERE FALSE
NOTE: this rewriter must be applied before auto parameterization, since after that we are just dealing with opaque parameters.
- object nameAllPatternElements extends Rewriter with Product with Serializable
- object nameMatchPatternElements extends Rewriter with Product with Serializable
- object namePatternComprehensionPatternElements extends Rewriter with Product with Serializable
- object nameUpdatingClauses extends Rewriter with Product with Serializable
- object normalizeArgumentOrder extends Rewriter with Product with Serializable
- object normalizeComparisons extends Rewriter with Product with Serializable
- object normalizeNotEquals extends Rewriter with Product with Serializable
- object normalizeSargablePredicates extends Rewriter with Product with Serializable
- object projectNamedPaths extends Rewriter with Product with Serializable
- object reattachAliasedExpressions extends Rewriter with Product with Serializable
- object replaceLiteralDynamicPropertyLookups extends Rewriter with Product with Serializable
- object simplifyPredicates extends Rewriter