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 virtual void OutE(GremlinToSqlContext currentContext, List <string> edgeLabels)
        {
            GremlinVariableProperty       sourceProperty = GetVariableProperty(GremlinKeyword.NodeID);
            GremlinVariableProperty       adjEdge        = GetVariableProperty(GremlinKeyword.EdgeAdj);
            GremlinBoundEdgeTableVariable outEdgeTable   = new GremlinBoundEdgeTableVariable(sourceProperty, adjEdge, WEdgeType.OutEdge);

            currentContext.VariableList.Add(outEdgeTable);
            currentContext.TableReferences.Add(outEdgeTable);
            currentContext.AddLabelPredicateForEdge(outEdgeTable, edgeLabels);

            currentContext.SetPivotVariable(outEdgeTable);
        }
Exemple #4
0
        internal virtual void InE(GremlinToSqlContext currentContext, List <string> edgeLabels)
        {
            GremlinVariableProperty       sourceProperty = GetVariableProperty(GremlinKeyword.NodeID);
            GremlinVariableProperty       adjReverseEdge = GetVariableProperty(GremlinKeyword.ReverseEdgeAdj);
            GremlinVariableProperty       labelProperty  = GetVariableProperty(GremlinKeyword.Label);
            GremlinBoundEdgeTableVariable inEdgeTable    = new GremlinBoundEdgeTableVariable(sourceProperty, adjReverseEdge, labelProperty, WEdgeType.InEdge);

            currentContext.VariableList.Add(inEdgeTable);
            currentContext.TableReferences.Add(inEdgeTable);
            currentContext.AddLabelPredicateForEdge(inEdgeTable, edgeLabels);

            //currentContext.PathList.Add(new GremlinMatchPath(null, inEdgeTable, this));
            currentContext.SetPivotVariable(inEdgeTable);
        }
Exemple #5
0
        internal override void InE(GremlinToSqlContext currentContext, List <string> edgeLabels)
        {
            if (this.IsTraversalToBound)
            {
                base.InE(currentContext, edgeLabels);
                return;
            }
            GremlinFreeEdgeVariable inEdge = new GremlinFreeEdgeVariable(WEdgeType.InEdge);

            currentContext.VariableList.Add(inEdge);
            currentContext.AddLabelPredicateForEdge(inEdge, edgeLabels);
            currentContext.MatchPathList.Add(new GremlinMatchPath(null, inEdge, this, false));
            currentContext.SetPivotVariable(inEdge);
        }
        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 OutE(GremlinToSqlContext currentContext, List <string> edgeLabels)
        {
            if (this.isTraversalToBound)
            {
                base.OutE(currentContext, edgeLabels);
                return;
            }
            GremlinFreeEdgeVariable outEdgeVar = new GremlinFreeEdgeVariable(WEdgeType.OutEdge);

            currentContext.VariableList.Add(outEdgeVar);
            currentContext.AddLabelPredicateForEdge(outEdgeVar, edgeLabels);
            currentContext.MatchPathList.Add(new GremlinMatchPath(this, outEdgeVar, null));
            currentContext.SetPivotVariable(outEdgeVar);
        }
        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);
        }
        internal virtual void In(GremlinToSqlContext currentContext, List <string> edgeLabels)
        {
            GremlinVariableProperty       sourceProperty = GetVariableProperty(GremlinKeyword.NodeID);
            GremlinVariableProperty       adjReverseEdge = GetVariableProperty(GremlinKeyword.ReverseEdgeAdj);
            GremlinBoundEdgeTableVariable inEdgeTable    = new GremlinBoundEdgeTableVariable(sourceProperty, adjReverseEdge, WEdgeType.InEdge);

            currentContext.VariableList.Add(inEdgeTable);
            currentContext.TableReferences.Add(inEdgeTable);
            currentContext.AddLabelPredicateForEdge(inEdgeTable, edgeLabels);

            GremlinVariableProperty    edgeProperty = inEdgeTable.GetVariableProperty(GremlinKeyword.EdgeSourceV);
            GremlinBoundVertexVariable outVertex    = new GremlinBoundVertexVariable(edgeProperty);

            currentContext.VariableList.Add(outVertex);
            currentContext.TableReferences.Add(outVertex);

            currentContext.SetPivotVariable(outVertex);
        }
Exemple #10
0
        internal override void Out(GremlinToSqlContext currentContext, List <string> edgeLabels)
        {
            if (this.IsTraversalToBound)
            {
                base.Out(currentContext, edgeLabels);
                return;
            }
            GremlinFreeEdgeVariable outEdge = new GremlinFreeEdgeVariable(WEdgeType.OutEdge);

            currentContext.VariableList.Add(outEdge);
            currentContext.AddLabelPredicateForEdge(outEdge, edgeLabels);

            GremlinFreeVertexVariable outVertex = new GremlinFreeVertexVariable();

            currentContext.VariableList.Add(outVertex);
            currentContext.TableReferencesInFromClause.Add(outVertex);
            currentContext.MatchPathList.Add(new GremlinMatchPath(this, outEdge, outVertex, false));
            currentContext.SetPivotVariable(outVertex);
        }
        internal override void In(GremlinToSqlContext currentContext, List <string> edgeLabels)
        {
            if (this.isTraversalToBound)
            {
                base.In(currentContext, edgeLabels);
                return;
            }
            GremlinFreeEdgeVariable inEdge = new GremlinFreeEdgeVariable(WEdgeType.InEdge);

            currentContext.VariableList.Add(inEdge);
            currentContext.AddLabelPredicateForEdge(inEdge, edgeLabels);

            GremlinFreeVertexVariable outVertex = new GremlinFreeVertexVariable();

            currentContext.VariableList.Add(outVertex);
            currentContext.TableReferences.Add(outVertex);
            currentContext.MatchPathList.Add(new GremlinMatchPath(outVertex, inEdge, this));
            currentContext.SetPivotVariable(outVertex);
        }
Exemple #12
0
        internal virtual void Out(GremlinToSqlContext currentContext, List <string> edgeLabels)
        {
            GremlinVariableProperty       sourceProperty = GetVariableProperty(GremlinKeyword.NodeID);
            GremlinVariableProperty       adjEdge        = GetVariableProperty(GremlinKeyword.EdgeAdj);
            GremlinVariableProperty       labelProperty  = GetVariableProperty(GremlinKeyword.Label);
            GremlinBoundEdgeTableVariable outEdgeTable   = new GremlinBoundEdgeTableVariable(sourceProperty, adjEdge, labelProperty, WEdgeType.OutEdge);

            currentContext.VariableList.Add(outEdgeTable);
            currentContext.TableReferences.Add(outEdgeTable);
            currentContext.AddLabelPredicateForEdge(outEdgeTable, edgeLabels);

            GremlinVariableProperty    sinkProperty = outEdgeTable.GetVariableProperty(GremlinKeyword.EdgeSinkV);
            GremlinBoundVertexVariable inVertex     = new GremlinBoundVertexVariable(sinkProperty);

            currentContext.VariableList.Add(inVertex);
            currentContext.TableReferences.Add(inVertex);

            //currentContext.PathList.Add(new GremlinMatchPath(this, outEdgeTable, inVertex));

            currentContext.SetPivotVariable(inVertex);
        }
Exemple #13
0
        internal override void Both(GremlinToSqlContext currentContext, List <string> edgeLabels)
        {
            if (this.IsTraversalToBound)
            {
                base.Both(currentContext, edgeLabels);
                return;
            }
            GremlinFreeEdgeVariable bothEdge = new GremlinFreeEdgeVariable(WEdgeType.BothEdge);

            currentContext.VariableList.Add(bothEdge);
            currentContext.AddLabelPredicateForEdge(bothEdge, 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-[bothEdge]->bothVertex in the context
            currentContext.TableReferencesInFromClause.Add(bothVertex);
            currentContext.MatchPathList.Add(new GremlinMatchPath(this, bothEdge, bothVertex, false));
            currentContext.SetPivotVariable(bothVertex);
        }
Exemple #14
0
        internal virtual void Both(GremlinToSqlContext currentContext, List <string> edgeLabels)
        {
            GremlinVariableProperty       sourceProperty = GetVariableProperty(GremlinKeyword.NodeID);
            GremlinVariableProperty       adjEdge        = GetVariableProperty(GremlinKeyword.EdgeAdj);
            GremlinVariableProperty       adjReverseEdge = GetVariableProperty(GremlinKeyword.ReverseEdgeAdj);
            GremlinBoundEdgeTableVariable bothEdgeTable  = new GremlinBoundEdgeTableVariable(
                sourceProperty,
                adjEdge,
                adjReverseEdge,
                WEdgeType.BothEdge);

            currentContext.VariableList.Add(bothEdgeTable);
            currentContext.TableReferences.Add(bothEdgeTable);
            currentContext.AddLabelPredicateForEdge(bothEdgeTable, edgeLabels);

            GremlinVariableProperty    otherProperty = bothEdgeTable.GetVariableProperty(GremlinKeyword.EdgeOtherV);
            GremlinBoundVertexVariable otherVertex   = new GremlinBoundVertexVariable(otherProperty);

            currentContext.VariableList.Add(otherVertex);
            currentContext.TableReferences.Add(otherVertex);
            currentContext.SetPivotVariable(otherVertex);
        }