internal void Reset() { GremlinVariable inputVariable = null; if (VariableList.First() is GremlinContextVariable) { inputVariable = VariableList.First(); } ParentContext = null; PivotVariable = null; VariableList.Clear(); ProjectedProperties.Clear(); TableReferences.Clear(); MatchPathList.Clear(); Predicates = null; StepList.Clear(); ContextLocalPath = null; //TODO: reserve the InputVariable, used for repeat step, should be refactored later if (inputVariable != null) { VariableList.Add(inputVariable); } }
public void SetContextLocalPath(GremlinLocalPathVariable contextLocalPath) { this.ContextLocalPath = contextLocalPath; foreach (var labelproperty in this.LabelPropertyList) { this.ContextLocalPath.PopulateStepProperty(labelproperty.Item2, labelproperty.Item1); } }
internal void PopulateLocalPath() { if (ContextLocalPath != null) { return; } ProjectedProperties.Add(GremlinKeyword.Path); foreach (var step in StepList) { step.PopulateLocalPath(); } GremlinLocalPathVariable newVariable = new GremlinLocalPathVariable(StepList); VariableList.Add(newVariable); TableReferences.Add(newVariable); ContextLocalPath = newVariable; }
internal void PopulateLocalPath() { if (this.ContextLocalPath != null) { return; } this.ProjectedProperties.Add(GremlinKeyword.Path); this.MinPathLength = 0; foreach (var step in this.StepList) { step.PopulateLocalPath(); this.MinPathLength += step.LocalPathLengthLowerBound; } GremlinLocalPathVariable newVariable = new GremlinLocalPathVariable(this.StepList); this.VariableList.Add(newVariable); this.TableReferencesInFromClause.Add(newVariable); this.ContextLocalPath = newVariable; }