internal override void OutE(GremlinToSqlContext currentContext, List <string> edgeLabels) { GremlinFreeEdgeTableVariable outEdgeTableVar = new GremlinFreeEdgeTableVariable(WEdgeType.OutEdge); currentContext.VariableList.Add(outEdgeTableVar); currentContext.AddLabelPredicateForEdge(outEdgeTableVar, edgeLabels); currentContext.AddPath(new GremlinMatchPath(this, outEdgeTableVar, null)); currentContext.SetPivotVariable(outEdgeTableVar); }
internal override void InE(GremlinToSqlContext currentContext, List <string> edgeLabels) { GremlinFreeEdgeTableVariable inEdgeTable = new GremlinFreeEdgeTableVariable(WEdgeType.InEdge); currentContext.VariableList.Add(inEdgeTable); currentContext.AddLabelPredicateForEdge(inEdgeTable, edgeLabels); currentContext.AddPath(new GremlinMatchPath(null, inEdgeTable, this)); currentContext.SetPivotVariable(inEdgeTable); }
internal override void Out(GremlinToSqlContext currentContext, List <string> edgeLabels) { GremlinFreeEdgeTableVariable outEdgeTable = new GremlinFreeEdgeTableVariable(WEdgeType.OutEdge); currentContext.VariableList.Add(outEdgeTable); currentContext.AddLabelPredicateForEdge(outEdgeTable, edgeLabels); GremlinFreeVertexVariable inVertex = new GremlinFreeVertexVariable(); currentContext.VariableList.Add(inVertex); currentContext.TableReferences.Add(inVertex); currentContext.AddPath(new GremlinMatchPath(this, outEdgeTable, inVertex)); currentContext.SetPivotVariable(inVertex); }
internal override void Both(GremlinToSqlContext currentContext, List <string> edgeLabels) { GremlinFreeEdgeTableVariable bothEdgeTable = new GremlinFreeEdgeTableVariable(WEdgeType.BothEdge); currentContext.VariableList.Add(bothEdgeTable); currentContext.AddLabelPredicateForEdge(bothEdgeTable, edgeLabels); GremlinFreeVertexVariable bothVertex = new GremlinFreeVertexVariable(); currentContext.VariableList.Add(bothVertex); // In this case, the both-edgeTable variable is not added to the table-reference list. // Instead, we populate a path this_variable-[bothEdgeTable]->bothVertex in the context currentContext.TableReferences.Add(bothVertex); currentContext.AddPath(new GremlinMatchPath(this, bothEdgeTable, bothVertex)); currentContext.SetPivotVariable(bothVertex); }