예제 #1
0
        //internal virtual void Sack() //Deprecated
        //internal virtual void Sack(BiFunction<V, U, V>) sackOperator) //Deprecated
        //internal virtual void Sack(BiFunction<V, U, V>) sackOperator, string, elementPropertyKey) //Deprecated

        internal virtual void Sample(GremlinToSqlContext currentContext, GremlinKeyword.Scope scope, int amountToSample, GremlinToSqlContext probabilityContext)
        {
            GremlinSampleVariable newVariable = new GremlinSampleVariable(scope, amountToSample, probabilityContext);

            currentContext.VariableList.Add(newVariable);
            currentContext.TableReferences.Add(newVariable);
        }
예제 #2
0
 public GremlinOrderVariable(GremlinVariable inputVariable, List <Tuple <object, IComparer> > byModulatingMap, GremlinKeyword.Scope scope)
     : base(GremlinVariableType.Table)
 {
     ByModulatingMap = byModulatingMap;
     Scope           = scope;
     InputVariable   = inputVariable;
 }
예제 #3
0
 public GremlinRangeOp(int low, int high, GremlinKeyword.Scope scope, bool isReverse = false)
 {
     Low       = low;
     High      = high;
     Scope     = scope;
     IsReverse = isReverse;
 }
 public GremlinSampleVariable(GremlinKeyword.Scope scope, int amountToSample, GremlinToSqlContext probabilityContext)
     : base(GremlinVariableType.Table)
 {
     Scope              = scope;
     AmountToSample     = amountToSample;
     ProbabilityContext = probabilityContext;
 }
예제 #5
0
 public GremlinSampleVariable(GremlinVariable inputVariable, GremlinKeyword.Scope scope, int amountToSample,
                              GremlinToSqlContext probabilityContext) : base(inputVariable.GetVariableType())
 {
     this.InputVariable      = inputVariable;
     this.Scope              = scope;
     this.AmountToSample     = amountToSample;
     this.ProbabilityContext = probabilityContext;
 }
예제 #6
0
 public GremlinDedupVariable(GremlinVariable inputVariable,
                             List <GremlinVariable> dedupVariables,
                             GremlinToSqlContext dedupContext,
                             GremlinKeyword.Scope scope) : base(inputVariable.GetVariableType())
 {
     this.InputVariable  = inputVariable;
     this.DedupVariables = new List <GremlinVariable>(dedupVariables);
     this.DedupContext   = dedupContext;
     this.Scope          = scope;
 }
 public GremlinDedupVariable(GremlinVariable inputVariable,
                             List <GremlinVariable> dedupVariables,
                             GremlinToSqlContext dedupContext,
                             GremlinKeyword.Scope scope) : base(GremlinVariableType.Table)
 {
     InputVariable  = inputVariable;
     DedupVariables = new List <GremlinVariable>(dedupVariables);
     DedupContext   = dedupContext;
     Scope          = scope;
 }
예제 #8
0
 public GraphTraversal2 Count(GremlinKeyword.Scope scope)
 {
     if (scope == GremlinKeyword.Scope.global)
     {
         AddGremlinOperator(new GremlinCountOp(scope));
     }
     else
     {
         AddGremlinOperator(new GremlinCountOp(scope));
     }
     return(this);
 }
예제 #9
0
 public GraphTraversal2 Limit(GremlinKeyword.Scope scope, int limit)
 {
     if (scope == GremlinKeyword.Scope.Global)
     {
         this.AddOperator(new GremlinRangeGlobalOp(0, limit));
     }
     else
     {
         this.AddOperator(new GremlinRangeLocalOp(0, limit));
     }
     return(this);
 }
예제 #10
0
 public GraphTraversal2 Dedup(GremlinKeyword.Scope scope, params string[] dedupLabels)
 {
     if (scope == GremlinKeyword.Scope.Global)
     {
         this.AddOperator(new GremlinDedupGlobalOp(dedupLabels));
     }
     else
     {
         this.AddOperator(new GremlinDedupLocalOp(dedupLabels));
     }
     return(this);
 }
예제 #11
0
 public GraphTraversal2 Tail(GremlinKeyword.Scope scope)
 {
     if (scope == GremlinKeyword.Scope.Global)
     {
         this.AddOperator(new GremlinRangeGlobalOp(0, 1, true));
     }
     else
     {
         this.AddOperator(new GremlinRangeLocalOp(0, 1, true));
     }
     return(this);
 }
예제 #12
0
 public GraphTraversal2 Sample(GremlinKeyword.Scope scope, int amountToSample)
 {
     if (scope == GremlinKeyword.Scope.Global)
     {
         this.AddOperator(new GremlinSampleGlobalOp(amountToSample));
     }
     else
     {
         this.AddOperator(new GremlinSampleLocalOp(amountToSample));
     }
     return(this);
 }
예제 #13
0
 public GraphTraversal2 Range(GremlinKeyword.Scope scope, int low, int high)
 {
     if (scope == GremlinKeyword.Scope.Global)
     {
         this.AddOperator(new GremlinRangeGlobalOp(low, high));
     }
     else
     {
         this.AddOperator(new GremlinRangeLocalOp(low, high));
     }
     return(this);
 }
예제 #14
0
 public GraphTraversal2 Order(GremlinKeyword.Scope scope)
 {
     if (scope == GremlinKeyword.Scope.Global)
     {
         this.AddOperator(new GremlinOrderGlobalOp());
     }
     else
     {
         this.AddOperator(new GremlinOrderLocalOp());
     }
     return(this);
 }
예제 #15
0
        internal virtual void Range(GremlinToSqlContext currentContext, int low, int high, GremlinKeyword.Scope scope, bool isReverse)
        {
            GremlinRangeVariable newVariable = new GremlinRangeVariable(this, low, high, scope, isReverse);

            currentContext.VariableList.Add(newVariable);
            currentContext.TableReferences.Add(newVariable);
        }
예제 #16
0
        internal virtual void Dedup(GremlinToSqlContext currentContext, List <string> dedupLabels, GremlinToSqlContext dedupContext, GremlinKeyword.Scope scope)
        {
            List <GremlinVariable> dedupVariables = new List <GremlinVariable>();

            foreach (var dedupLabel in dedupLabels)
            {
                dedupVariables.Add(currentContext.Select(dedupLabel).Last());
            }

            GremlinDedupVariable newVariable = new GremlinDedupVariable(this, dedupVariables, dedupContext, scope);

            currentContext.VariableList.Add(newVariable);
            currentContext.TableReferences.Add(newVariable);
        }
예제 #17
0
        internal virtual void Order(GremlinToSqlContext currentContext, List <Tuple <object, IComparer> > byModulatingMap, GremlinKeyword.Scope scope)
        {
            GremlinOrderVariable newVariable = new GremlinOrderVariable(this, byModulatingMap, scope);

            currentContext.VariableList.Add(newVariable);
            currentContext.TableReferences.Add(newVariable);
        }
예제 #18
0
 public GremlinDedupOp(GremlinKeyword.Scope scope, params string[] dedupLabels)
 {
     DedupLabels = new List <string>(dedupLabels);
     Scope       = scope;
 }
예제 #19
0
 internal override void Sample(GremlinToSqlContext currentContext, GremlinKeyword.Scope scope, int amountToSample,
                               GremlinToSqlContext probabilityContext)
 {
     this.IsTraversalToBound = true;
     base.Sample(currentContext, scope, amountToSample, probabilityContext);
 }
예제 #20
0
 internal override void Range(GremlinToSqlContext currentContext, int low, int high, GremlinKeyword.Scope scope, bool isReverse)
 {
     this.IsTraversalToBound = true;
     base.Range(currentContext, low, high, scope, isReverse);
 }
 public GremlinRangeVariable(GremlinVariable inputVariable, int low, int high, GremlinKeyword.Scope scope, bool isReverse) : base(GremlinVariableType.Table)
 {
     InputVaribale = inputVariable;
     Low           = low;
     High          = high;
     IsLocal       = scope != GremlinKeyword.Scope.global;
     IsReverse     = isReverse;
 }
예제 #22
0
 public GraphTraversal2 Sum(GremlinKeyword.Scope scope)
 {
     AddGremlinOperator(new GremlinSumOp(scope));
     return(this);
 }
예제 #23
0
 public GremlinSampleOp(GremlinKeyword.Scope scope, int amountToSample)
 {
     Scope          = scope;
     AmountToSample = amountToSample;
 }
예제 #24
0
 public GremlinRangeVariable(GremlinVariable inputVariable, int low, int high, GremlinKeyword.Scope scope, bool isReverse) : base(inputVariable.GetVariableType())
 {
     this.InputVariable = inputVariable;
     this.Low           = low;
     this.High          = high;
     this.Scope         = scope;
     this.IsReverse     = isReverse;
 }
예제 #25
0
 public GraphTraversal2 Range(GremlinKeyword.Scope scope, int low, int high)
 {
     AddGremlinOperator(new GremlinRangeOp(low, high, scope));
     return(this);
 }
예제 #26
0
 public GremlinCountOp(GremlinKeyword.Scope scope)
 {
     Scope = scope;
 }
예제 #27
0
 public GraphTraversal2 tail(GremlinKeyword.Scope scope, int limit)
 {
     AddGremlinOperator(new GremlinRangeOp(0, limit, scope, true));
     return(this);
 }
예제 #28
0
 internal override void Dedup(GremlinToSqlContext currentContext, List <string> dedupLabels, GraphTraversal dedupTraversal, GremlinKeyword.Scope scope)
 {
     this.IsTraversalToBound = scope == GremlinKeyword.Scope.Global;
     base.Dedup(currentContext, dedupLabels, dedupTraversal, scope);
 }
예제 #29
0
 public GremlinMinOp(GremlinKeyword.Scope scope)
 {
     Scope = scope;
 }
예제 #30
0
 internal override void Order(GremlinToSqlContext currentContext, List <Tuple <GremlinToSqlContext, IComparer> > byModulatingMap,
                              GremlinKeyword.Scope scope)
 {
     this.IsTraversalToBound = true;
     base.Order(currentContext, byModulatingMap, scope);
 }