예제 #1
0
 public GremlinAddVVariable(string vertexLabel, List <object> vertexProperties, bool isFirstTableReference = false)
 {
     VertexProperties      = new List <object>(vertexProperties);
     VertexLabel           = vertexLabel;
     IsFirstTableReference = isFirstTableReference;
     ProjectedProperties.Add(GremlinKeyword.Label);
 }
예제 #2
0
 internal override void PopulateLocalPath()
 {
     if (ProjectedProperties.Contains(GremlinKeyword.Path))
     {
         return;
     }
     ProjectedProperties.Add(GremlinKeyword.Path);
     RepeatContext.PopulateLocalPath();
 }
예제 #3
0
 internal void Populate(string property)
 {
     if (ProjectedProperties.Contains(property))
     {
         return;
     }
     ProjectedProperties.Add(property);
     PivotVariable.Populate(property);
 }
예제 #4
0
 public GremlinAddETableVariable(GremlinVariable inputVariable, string edgeLabel)
 {
     EdgeProperties = new List <object>();
     EdgeLabel      = edgeLabel;
     InputVariable  = inputVariable;
     EdgeType       = WEdgeType.OutEdge;
     OtherVIndex    = 1;
     ProjectedProperties.Add(GremlinKeyword.Label);
 }
예제 #5
0
 internal override void PopulateLocalPath()
 {
     if (ProjectedProperties.Contains(GremlinKeyword.Path))
     {
         return;
     }
     ProjectedProperties.Add(GremlinKeyword.Path);
     this.LocalContext.PopulateLocalPath();
     this.LocalPathLengthLowerBound = this.LocalContext.MinPathLength;
 }
예제 #6
0
        internal override void Populate(string property)
        {
            if (ProjectedProperties.Contains(property))
            {
                return;
            }
            ProjectedProperties.Add(property);

            UnfoldVariable.Populate(property);
        }
예제 #7
0
 internal override void PopulateLocalPath()
 {
     if (ProjectedProperties.Contains(GremlinKeyword.Path))
     {
         return;
     }
     ProjectedProperties.Add(GremlinKeyword.Path);
     foreach (var context in UnionContextList)
     {
         context.PopulateLocalPath();
     }
 }
 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);
 }
예제 #9
0
        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;
        }
예제 #10
0
 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();
         }
     }
 }
        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
                    };
                }
            }
        }
예제 #12
0
 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);
 }
예제 #14
0
 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);
 }
예제 #16
0
 public GremlinInjectVariable(GremlinVariable inputVariable, object injection) : base(GremlinVariableType.Table)
 {
     InputVariable = inputVariable;
     Injection     = injection;
     ProjectedProperties.Add(GremlinKeyword.TableDefaultColumnName);
 }