internal void DropProperties(GremlinVariable belongToVariable, List <string> PropertyKeys) { List <object> properties = new List <object>(); foreach (var propertyKey in PropertyKeys) { properties.Add(propertyKey); properties.Add(null); } if (PropertyKeys.Count == 0) { properties.Add(GremlinKeyword.Star); properties.Add(null); } GremlinUpdatePropertiesVariable dropVariable = null; switch (belongToVariable.GetVariableType()) { case GremlinVariableType.Vertex: dropVariable = new GremlinUpdateVertexPropertiesVariable(belongToVariable, properties); break; case GremlinVariableType.Edge: dropVariable = new GremlinUpdateEdgePropertiesVariable(belongToVariable, properties); break; } VariableList.Add(dropVariable); TableReferences.Add(dropVariable); SetPivotVariable(dropVariable); }
internal virtual void Property(GremlinToSqlContext currentContext, GremlinProperty vertexProperty) { GremlinUpdatePropertiesVariable updateVariable = currentContext.VariableList.Find( p => (p is GremlinUpdatePropertiesVariable) && (p as GremlinUpdatePropertiesVariable).UpdateVariable == this) as GremlinUpdatePropertiesVariable; if (updateVariable == null) { updateVariable = new GremlinUpdatePropertiesVariable(this, vertexProperty); currentContext.VariableList.Add(updateVariable); currentContext.TableReferences.Add(updateVariable); } else { updateVariable.PropertyList.Add(vertexProperty); } }