internal override void PopulateLocalPath() { if (ProjectedProperties.Contains(GremlinKeyword.Path)) { return; } ProjectedProperties.Add(GremlinKeyword.Path); this.OptionalContext.PopulateLocalPath(); this.LocalPathLengthLowerBound = 0; }
internal override void Populate(string property) { if (ProjectedProperties.Contains(property)) { return; } ProjectedProperties.Add(property); UnfoldVariable.Populate(property); }
internal override void Populate(string property) { if (ProjectedProperties.Contains(property)) { return; } base.Populate(property); RealVariable.Populate(property); }
internal override void Populate(string property) { if (ProjectedProperties.Contains(property)) { return; } base.Populate(property); SubqueryContext.Populate(property); }
internal override void Populate(string property) { if (ProjectedProperties.Contains(property)) { return; } base.Populate(property); InputVariable.Populate(property); OptionalContext.Populate(property); }
internal override void PopulateLocalPath() { if (ProjectedProperties.Contains(GremlinKeyword.Path)) { return; } ProjectedProperties.Add(GremlinKeyword.Path); foreach (var context in UnionContextList) { context.PopulateLocalPath(); } }
internal override void Populate(string property) { if (ProjectedProperties.Contains(property)) { return; } base.Populate(property); foreach (var context in CoalesceContextList) { context.Populate(property); } }
internal override void Property(GremlinToSqlContext currentContext, GremlinProperty vertexProperty) { vertexProperty.Cardinality = GremlinKeyword.PropertyCardinality.list; if (PropertyFromAddVParameters.ContainsKey(vertexProperty.Key)) { foreach (var property in PropertyFromAddVParameters[vertexProperty.Key]) { VertexProperties.Remove(property); } } ProjectedProperties.Add(vertexProperty.Key); VertexProperties.Add(vertexProperty); }
internal override void Populate(string property) { if (ProjectedProperties.Contains(property)) { return; } base.Populate(property); foreach (var variable in GremlinVariableList) { variable.Populate(property); } }
internal override void Populate(string property) { if (ProjectedProperties.Contains(property)) { return; } base.Populate(property); foreach (var variableList in BrachVariableList) { foreach (var variable in variableList) { variable.BottomUpPopulate(ParentVariable, property, Label + "_" + property); } } }
internal override void Populate(string property) { RealVariable.Populate(property); if (ProjectedProperties.Contains(property)) { return; } switch (GetVariableType()) { case GremlinVariableType.Vertex: if (GremlinUtil.IsEdgeProperty(property)) { return; } break; case GremlinVariableType.Edge: if (GremlinUtil.IsVertexProperty(property)) { return; } break; case GremlinVariableType.Scalar: if (property != GremlinKeyword.ScalarValue) { return; } break; case GremlinVariableType.Property: if (property != GremlinKeyword.PropertyValue) { return; } break; } base.Populate(property); if (!PropertiesMap.ContainsKey(property)) { string columnName = SelectKey + "_" + property; RealVariable.BottomUpPopulate(AttachedVariable, property, columnName); PropertiesMap[property] = columnName; } }
internal override void Populate(string property) { if (ProjectedProperties.Contains(property)) { return; } base.Populate(property); InputVariable.Populate(property); if (SelectedVariableList.Exists(p => p.Item1 != property)) { RepeatContext.Populate(property); } else { RepeatContext.Populate(property); } }
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 override void PopulateLocalPath() { if (ProjectedProperties.Contains(GremlinKeyword.Path)) { return; } ProjectedProperties.Add(GremlinKeyword.Path); if (PredicateContext != null) { TrueChoiceContext.PopulateLocalPath(); FalseChocieContext.PopulateLocalPath(); } else { foreach (var option in Options) { option.Value.PopulateLocalPath(); } } }
internal override void Populate(string property) { if (ProjectedProperties.Contains(property)) { return; } switch (GetVariableType()) { case GremlinVariableType.Vertex: if (GremlinUtil.IsEdgeProperty(property)) { return; } break; case GremlinVariableType.Edge: if (GremlinUtil.IsVertexProperty(property)) { return; } break; case GremlinVariableType.VertexProperty: if (GremlinUtil.IsVertexProperty(property) || GremlinUtil.IsEdgeProperty(property)) { return; } break; case GremlinVariableType.Scalar: case GremlinVariableType.Property: if (property != GremlinKeyword.TableDefaultColumnName) { return; } break; } base.Populate(property); }
public GremlinAddVVariable(string vertexLabel, List <GremlinProperty> vertexProperties, bool isFirstTableReference = false) { VertexProperties = new List <GremlinProperty>(vertexProperties); VertexLabel = vertexLabel; IsFirstTableReference = isFirstTableReference; ProjectedProperties.Add(GremlinKeyword.Label); PropertyFromAddVParameters = new Dictionary <string, List <GremlinProperty> >(); foreach (var property in vertexProperties) { ProjectedProperties.Add(property.Key); if (PropertyFromAddVParameters.ContainsKey(property.Key)) { PropertyFromAddVParameters[property.Key].Add(property); } else { PropertyFromAddVParameters[property.Key] = new List <GremlinProperty> { property }; } } }
internal override void PopulateLocalPath() { if (ProjectedProperties.Contains(GremlinKeyword.Path)) { return; } ProjectedProperties.Add(GremlinKeyword.Path); if (this.PredicateContext != null) { this.TrueChoiceContext.PopulateLocalPath(); this.FalseChocieContext.PopulateLocalPath(); this.LocalPathLengthLowerBound = Math.Min(this.TrueChoiceContext.MinPathLength, this.FalseChocieContext.MinPathLength); } else { this.LocalPathLengthLowerBound = Int32.MaxValue; foreach (var option in this.Options) { option.Value.PopulateLocalPath(); this.LocalPathLengthLowerBound = Math.Min(this.LocalPathLengthLowerBound, option.Value.MinPathLength); } } }
public GremlinDerivedTableVariable(GremlinToSqlContext subqueryContext) { SubqueryContext = subqueryContext; ProjectedProperties.Add(GremlinKeyword.ScalarValue); }
public GremlinInjectVariable(GremlinVariable inputVariable, object injection) : base(GremlinVariableType.Table) { InputVariable = inputVariable; Injection = injection; ProjectedProperties.Add(GremlinKeyword.TableDefaultColumnName); }
internal override void Property(GremlinToSqlContext currentContext, List <object> properties) { ProjectedProperties.Add(properties.First() as string); VertexProperties.AddRange(properties); }
internal override void Property(GremlinToSqlContext currentContext, GremlinProperty property) { ProjectedProperties.Add(property.Key); EdgeProperties.Add(property); }