internal override GremlinToSqlContext GetContext() { GremlinToSqlContext inputContext = GetInputContext(); HashSet <GremlinProperty> properties = new HashSet <GremlinProperty>(); foreach (GremlinPropertyOp propertyOp in PropertyOps) { GremlinProperty property = propertyOp.ToGremlinProperty(inputContext); property.Cardinality = GremlinKeyword.PropertyCardinality.List; properties.Add(property); } if (inputContext.PivotVariable == null) { GremlinAddVVariable newVariable = new GremlinAddVVariable(null, VertexLabel, properties, true); inputContext.VariableList.Add(newVariable); inputContext.TableReferencesInFromClause.Add(newVariable); inputContext.SetPivotVariable(newVariable); } else { inputContext.PivotVariable.AddV(inputContext, VertexLabel, properties); } return(inputContext); }
internal virtual void AddV(GremlinToSqlContext currentContext, string vertexLabel, List <GremlinProperty> propertyKeyValues) { GremlinAddVVariable newVariable = new GremlinAddVVariable(vertexLabel, propertyKeyValues); currentContext.VariableList.Add(newVariable); currentContext.TableReferences.Add(newVariable); currentContext.SetPivotVariable(newVariable); }
internal override GremlinToSqlContext GetContext() { GremlinToSqlContext inputContext = GetInputContext(); if (inputContext.PivotVariable == null) { GremlinAddVVariable newVariable = new GremlinAddVVariable(VertexLabel, PropertyKeyValues, true); inputContext.VariableList.Add(newVariable); inputContext.TableReferences.Add(newVariable); inputContext.SetPivotVariable(newVariable); } else { inputContext.PivotVariable.AddV(inputContext, VertexLabel, PropertyKeyValues); } return(inputContext); }