Versions in this module Expand all Collapse all v0 v0.6.0 Jun 23, 2026 Changes in this version + const LoweringAggregateTraversalCount + const LoweringCollectIDMembership + const LoweringCountStoreFastPath + const LoweringExpandIntoDetection + const LoweringExpansionSuffixPushdown + const LoweringLatePathMaterialization + const LoweringLimitPushdown + const LoweringPredicatePlacement + const LoweringProjectionPruning + const LoweringShortestPathFilter + const LoweringShortestPathStrategy + const LoweringTraversalDirection + func AddFromClauseBindings(localScope *pgsql.IdentifierSet, fromClauses []pgsql.FromClause) + func AddFromExpressionBinding(localScope *pgsql.IdentifierSet, expression pgsql.Expression) + func ExpressionReferencesOnlyLocalIdentifiers(expression pgsql.Expression, localScope *pgsql.IdentifierSet) bool + func FlattenConjunction(expr pgsql.Expression) []pgsql.Expression + func FromExpressionReferencesOnlyLocalIdentifiers(expression pgsql.Expression, localScopes ...*pgsql.IdentifierSet) bool + func IndexPatternPredicateTargets(query *cypher.RegularQuery) map[*cypher.PatternPredicate]PatternTarget + func IndexPatternTargets(query *cypher.RegularQuery) map[*cypher.PatternPart]PatternTarget + func IsBidirectionalSearchAnchor(selectivity int) bool + func IsLocalToScope(expression pgsql.Expression, localScope *pgsql.IdentifierSet) bool + func MeasureSelectivity(bindings BindingLookup, expression pgsql.Expression) (int, error) + func PartitionConstraintByLocality(expression pgsql.Expression, localScope *pgsql.IdentifierSet) (pgsql.Expression, pgsql.Expression) + func QueryReferencesOnlyLocalIdentifiers(query pgsql.Query, localScope *pgsql.IdentifierSet) bool + func SelectReferencesOnlyLocalIdentifiers(selectBody pgsql.Select, localScope *pgsql.IdentifierSet) bool + func SubqueryReferencesOnlyLocalIdentifiers(subquery pgsql.Subquery, localScope *pgsql.IdentifierSet) bool + type AggregateTraversalCountDecision struct + CountAlias string + Limit int64 + QueryPartIndex int + SourceSymbol string + Target TraversalStepTarget + TerminalSymbol string + type AggregateTraversalCountShape struct + CountAlias string + Direction graph.Direction + Limit int64 + MaxDepth int64 + MinDepth int64 + QueryPartIndex int + RelationshipKinds graph.Kinds + ReturnCount bool + ReturnCountAlias string + ReturnSourceAlias string + SourceKinds graph.Kinds + SourceMatch *cypher.Match + SourceSymbol string + Target TraversalStepTarget + TerminalKinds graph.Kinds + TerminalMatch *cypher.Match + TerminalSymbol string + func AggregateTraversalCountShapeForQuery(query *cypher.RegularQuery) (AggregateTraversalCountShape, bool) + type Analysis struct + QueryParts []QueryPart + func Analyze(query *cypher.RegularQuery) Analysis + func (s Analysis) Diagnostics() []string + func (s Analysis) String() string + type Barrier struct + ClauseIndex int + Dependencies []string + Kind BarrierKind + QueryPartIndex int + type BarrierKind string + const BarrierKindOptionalMatch + const BarrierKindReturn + const BarrierKindUnwind + const BarrierKindUpdate + const BarrierKindWith + type Binding struct + ClauseIndex int + Kind BindingKind + PatternIndex int + Symbol string + type BindingKind string + const BindingKindNode + const BindingKindPath + const BindingKindRelationship + type BindingLookup interface + LookupDataType func(identifier pgsql.Identifier) (pgsql.DataType, bool) + type ConservativePatternReorderingRule struct + func (s ConservativePatternReorderingRule) Apply(plan *Plan) (bool, error) + func (s ConservativePatternReorderingRule) Name() string + type CountStoreFastPathDecision struct + BindingSymbol string + ClauseIndex int + KindSymbols []string + PatternIndex int + QueryPartIndex int + Target CountStoreFastPathTarget + type CountStoreFastPathTarget string + const CountStoreFastPathEdge + const CountStoreFastPathNode + type ExpandIntoDecision struct + Target TraversalStepTarget + type ExpansionSuffixPushdownDecision struct + PredicateAttachments []PredicateAttachment + SuffixEndStep int + SuffixLength int + SuffixStartStep int + Target TraversalStepTarget + type LatePathMaterializationDecision struct + Mode LatePathMaterializationMode + Target TraversalStepTarget + type LatePathMaterializationMode string + const LatePathMaterializationEdgeComposite + const LatePathMaterializationExpansionPath + const LatePathMaterializationPathEdgeID + type LimitPushdownDecision struct + Mode LimitPushdownMode + Target TraversalStepTarget + type LimitPushdownMode string + const LimitPushdownShortestPathHarness + const LimitPushdownTraversalCTE + type LoweringDecision struct + Name string + type LoweringPlan struct + AggregateTraversalCount []AggregateTraversalCountDecision + CountStoreFastPath []CountStoreFastPathDecision + ExpandInto []ExpandIntoDecision + ExpansionSuffixPushdown []ExpansionSuffixPushdownDecision + LatePathMaterialization []LatePathMaterializationDecision + LimitPushdown []LimitPushdownDecision + PatternPredicate []PatternPredicatePlacementDecision + PredicatePlacement []PredicatePlacementDecision + ProjectionPruning []ProjectionPruningDecision + ShortestPathFilter []ShortestPathFilterDecision + ShortestPathStrategy []ShortestPathStrategyDecision + TraversalDirection []TraversalDirectionDecision + func BuildLoweringPlan(query *cypher.RegularQuery, predicateAttachments []PredicateAttachment) (LoweringPlan, error) + func (s LoweringPlan) Decisions() []LoweringDecision + func (s LoweringPlan) Empty() bool + type MatchClause struct + Index int + PatternCount int + WherePredicates int + type Optimizer struct + func NewOptimizer(rules ...Rule) Optimizer + func (s Optimizer) Optimize(query *cypher.RegularQuery) (Plan, error) + type PathVariable struct + ClauseIndex int + Dependencies []string + NodeCount int + PatternIndex int + RelationshipCount int + Symbol string + VariableLength bool + type PatternPredicatePlacementDecision struct + Mode PatternPredicatePlacementMode + Target TraversalStepTarget + type PatternPredicatePlacementMode string + const PatternPredicatePlacementExistence + type PatternTarget struct + ClauseIndex int + PatternIndex int + Predicate bool + PredicateIndex int + QueryPartIndex int + func (s PatternTarget) TraversalStep(stepIndex int) TraversalStepTarget + type Plan struct + Analysis Analysis + LoweringPlan LoweringPlan + PredicateAttachments []PredicateAttachment + Query *cypher.RegularQuery + Rules []RuleResult + func Optimize(query *cypher.RegularQuery) (Plan, error) + type Predicate struct + ClauseIndex int + Dependencies []string + ExpressionIndex int + type PredicateAttachment struct + BindingSymbols []string + ClauseIndex int + Dependencies []string + ExpressionIndex int + QueryPartIndex int + RegionIndex int + Scope PredicateAttachmentScope + func AttachPredicates(analysis Analysis) []PredicateAttachment + type PredicateAttachmentRule struct + func (s PredicateAttachmentRule) Apply(plan *Plan) (bool, error) + func (s PredicateAttachmentRule) Name() string + type PredicateAttachmentScope string + const PredicateAttachmentScopeBinding + const PredicateAttachmentScopeRegion + type PredicatePlacementDecision struct + Attachment PredicateAttachment + Placement PredicateAttachmentScope + Target TraversalStepTarget + type ProjectionPruningDecision struct + OmitLeftNode bool + OmitPathBinding bool + OmitRelationship bool + OmitRightNode bool + PatternBindingReferenced bool + ReferencedSymbols []string + Target TraversalStepTarget + type QueryPart struct + Barriers []Barrier + Index int + Kind QueryPartKind + ProjectionDependencies []string + Regions []Region + type QueryPartKind string + const QueryPartKindMulti + const QueryPartKindSingle + type Region struct + BindingOccurrences []Binding + Bindings []Binding + Clauses []MatchClause + EndClause int + PathVariables []PathVariable + Predicates []Predicate + QueryPartIndex int + StartClause int + type Rule interface + Apply func(*Plan) (bool, error) + Name func() string + func DefaultRules() []Rule + type RuleResult struct + Applied bool + Name string + type SelectivityModel struct + func NewSelectivityModel(bindings BindingLookup) SelectivityModel + func (s SelectivityModel) EndpointSelectivity(expression pgsql.Expression, bound, hasPreviousFrameBinding bool) (int, error) + func (s SelectivityModel) Measure(expression pgsql.Expression) (int, error) + func (s SelectivityModel) ShouldFlipTraversalDirection(leftBound, rightBound bool, leftExpression, rightExpression pgsql.Expression) (bool, error) + type ShortestPathFilterDecision struct + Mode ShortestPathFilterMode + Reason string + Target TraversalStepTarget + type ShortestPathFilterMode string + const ShortestPathFilterEndpointPair + const ShortestPathFilterTerminal + type ShortestPathStrategy string + const ShortestPathStrategyBidirectional + const ShortestPathStrategyUnidirectional + type ShortestPathStrategyDecision struct + Reason string + Strategy ShortestPathStrategy + Target TraversalStepTarget + type TraversalDirectionDecision struct + Flip bool + Reason string + Target TraversalStepTarget + type TraversalStepTarget struct + ClauseIndex int + PatternIndex int + Predicate bool + PredicateIndex int + QueryPartIndex int + StepIndex int