//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); }
public GremlinAddETableVariable(GremlinVariable inputVariable, string edgeLabel, List <GremlinProperty> edgeProperties, GremlinToSqlContext fromContext, GremlinToSqlContext toContext) { EdgeProperties = edgeProperties; EdgeLabel = edgeLabel; InputVariable = inputVariable; EdgeType = WEdgeType.OutEdge; OtherVIndex = 1; FromVertexContext = fromContext; ToVertexContext = toContext; }
internal override void OutE(GremlinToSqlContext currentContext, List <string> edgeLabels) { currentContext.OutE(this, edgeLabels); }
public GremlinTreeVariable(GremlinToSqlContext subqueryContext, GremlinVariable pathVariable) : base(subqueryContext, GremlinVariableType.Tree) { PathVariable = pathVariable; }
public GremlinFoldVariable(GremlinToSqlContext subqueryContext) : base(subqueryContext, GremlinVariableType.List) { FoldVariable = subqueryContext.PivotVariable; }
internal override void Values(GremlinToSqlContext currentContext, List <string> propertyKeys) { currentContext.Values(this, propertyKeys); }
public GremlinDerivedTableVariable(GremlinToSqlContext subqueryContext, GremlinVariableType variableType) : base(variableType) { this.SubqueryContext = subqueryContext; }
public GremlinOptionalPropertyVariable(GremlinToSqlContext context, GremlinVariable inputVariable) : base(context, inputVariable, GremlinVariableType.Property) { }
internal override void Key(GremlinToSqlContext currentContext) { currentContext.Key(this); }
public GremlinOptionalVertexVariable(GremlinToSqlContext context, GremlinVariable inputVariable) : base(context, inputVariable, GremlinVariableType.Vertex) { }
public GremlinOptionalScalarVariable(GremlinToSqlContext context, GremlinVariable inputVariable) : base(context, inputVariable, GremlinVariableType.Scalar) { }
public GremlinAggregateVariable(GremlinToSqlContext projectContext, string sideEffectKey) { this.ProjectContext = projectContext; this.SideEffectKey = sideEffectKey; }
internal override GremlinToSqlContext GetContext() { GremlinToSqlContext inputContext = GetInputContext(); if (inputContext.PivotVariable == null) { throw new TranslationException("The PivotVariable of has()-step can't be null."); } switch (Type) { //has(key) case GremlinHasType.HasProperty: inputContext.PivotVariable.Has(inputContext, PropertyKey); break; //hasNot(key) case GremlinHasType.HasNotProperty: inputContext.PivotVariable.HasNot(inputContext, PropertyKey); break; //has(key, value) | has(key, predicate) case GremlinHasType.HasPropertyValueOrPredicate: inputContext.PivotVariable.Has(inputContext, PropertyKey, ValueOrPredicate); break; //has(key, traversal) case GremlinHasType.HasPropertyTraversal: Traversal.GetStartOp().InheritedVariableFromParent(inputContext); if (Traversal.GetStartOp() is GremlinParentContextOp) { if (Traversal.GremlinTranslationOpList.Count > 1) { Traversal.InsertGremlinOperator(1, new GremlinValuesOp(PropertyKey)); } else { Traversal.AddGremlinOperator(new GremlinValuesOp(PropertyKey)); } } GremlinToSqlContext hasContext = Traversal.GetEndOp().GetContext(); inputContext.AllTableVariablesInWhereClause.AddRange(hasContext.FetchAllTableVars()); inputContext.AddPredicate(hasContext.ToSqlBoolean()); break; //has(label, key, value) | has(label, key, predicate) case GremlinHasType.HasLabelPropertyValue: inputContext.PivotVariable.Has(inputContext, GremlinKeyword.Label, Label); inputContext.PivotVariable.Has(inputContext, PropertyKey, ValueOrPredicate); break; //hasId(values) case GremlinHasType.HasId: case GremlinHasType.HasLabel: inputContext.PivotVariable.HasIdOrLabel(inputContext, Type, ValuesOrPredicates); break; //=================================================================== //hasKey(values) || hasValue(values) case GremlinHasType.HasKey: case GremlinHasType.HasValue: inputContext.PivotVariable.HasKeyOrValue(inputContext, Type, ValuesOrPredicates); break; } return(inputContext); }
internal virtual void Select(GremlinToSqlContext currentContext, GremlinKeyword.Pop pop, List <string> selectKeys) { throw new NotImplementedException(); }
internal override void HasLabel(GremlinToSqlContext currentContext, List <object> values) { currentContext.HasLabel(this, values); }
internal override void Value(GremlinToSqlContext currentContext) { currentContext.Value(this); }
internal override void HasLabel(GremlinToSqlContext currentContext, Predicate predicate) { currentContext.HasLabel(this, predicate); }
public GremlinOptionalTableVariable(GremlinToSqlContext context, GremlinVariable inputVariable) : base(context, inputVariable, GremlinVariableType.Table) { }
public GremlinStoreVariable(GremlinToSqlContext projectContext, string sideEffectKey) { ProjectContext = projectContext; SideEffectKey = sideEffectKey; Labels.Add(sideEffectKey); }
internal override void OtherV(GremlinToSqlContext currentContext) { currentContext.OtherV(this); }
public GremlinSumVariable(GremlinToSqlContext subqueryContext) : base(subqueryContext, GremlinVariableType.Scalar) { }
internal override void BothV(GremlinToSqlContext currentContext) { currentContext.BothV(this); }
} // such as aggregate("a"), sotre("a"), as("a") public GremlinCapVariable(GremlinToSqlContext subqueryContext, List <GremlinVariable> sideEffectVariables, List <string> sideEffectKeys) : base(subqueryContext, GremlinVariableType.List) { SideEffectKeys = sideEffectKeys; SideEffectVariables = sideEffectVariables; }
internal override void Has(GremlinToSqlContext currentContext, string propertyKey, GremlinToSqlContext propertyContext) { currentContext.Has(this, propertyKey, propertyContext); }
public GremlinLocalVariable(GremlinToSqlContext localContext, GremlinVariableType variableType) : base(variableType) { LocalContext = localContext; LocalContext.HomeVariable = this; }
internal override void Has(GremlinToSqlContext currentContext, string label, string propertyKey, object value) { currentContext.Has(this, label, propertyKey, value); }
public GremlinLocalVariable(GremlinToSqlContext localContext, GremlinVariableType variableType) : base(variableType) { this.LocalContext = localContext; }
internal override void Has(GremlinToSqlContext currentContext, string label, string propertyKey, Predicate predicate) { currentContext.Has(this, label, propertyKey, predicate); }
internal override void Drop(GremlinToSqlContext currentContext) { currentContext.DropVertex(this); }
internal virtual void Path(GremlinToSqlContext currentContext, List <GraphTraversal2> byList) { currentContext.SetPivotVariable(generatePath(currentContext, byList)); }