protected override void Visit(PredicateNode visitedNode) { //get left and right and make a stringy lookup of the enum and put that in the middle _sqlBuilder.Append($"`{visitedNode.Left}` "); _sqlBuilder.Append(visitedNode.Condition.ToSQL()).Append(" "); _sqlBuilder.Append($"'{visitedNode.Right}'"); }
protected override void Visit(PredicateNode visitedNode) { //get left and right and make a stringy lookup of the enum and put that in the middle //_xmindTree.Append('\t', _depth+1).AppendLine(visitedNode.Condition.ToString()); //_xmindTree.Append('\t', _depth + 2).AppendLine(visitedNode.Left); //_xmindTree.Append('\t', _depth + 2).AppendLine(visitedNode.Right.ToString()); _xmindTree.Append('\t', _depth + 1).Append(visitedNode.Left).Append(visitedNode.Condition.ToSQL()).AppendLine(visitedNode.Right.ToString()); }
protected override void Visit(PredicateNode visitedNode) { _position++; if (_position == _cutPoint) { _cutNode = visitedNode; _done = true; } }
private int _countOccurrences(PredicateNode p1, List <PredicateNode> nodelist) { var count = 0; foreach (var node in nodelist) { //The left of the predicate node is the column if (node.Left == p1.Left) { count++; } } return(count); }
protected override Node Visit(PredicateNode node) { var columnName = node.Left; columnCounts.TryGetValue(columnName, out int count); columnCounts[columnName] = ++count; if (count > maxDuplication) { return(null); } else { return(node); } }
protected override void Visit(PredicateNode visitedNode) { if (_mutatePoint <= 1) { _done = true; _tree = visitedNode; return; } _position++; if (_position == _mutatePoint) { _replaceMeNode = visitedNode; _replaceWithNode = visitedNode.Mutate(); _done = true; } }
protected override void Visit(PredicateNode visitedNode) { if (visitedNode == null) { throw new ArgumentNullException(nameof(visitedNode)); } if (_cutPoint == 0) { _crossNode = visitedNode; return; } _position += 1; if (_position == _cutPoint) { _crossNode = visitedNode; } }
protected override void Visit(PredicateNode visitedNode) { _position++; if (_columnCounter.ContainsKey(visitedNode.Left)) { if (_columnCounter[visitedNode.Left] >= _componentRestrictions) { _deleteMeNode = visitedNode; return; } _columnCounter[visitedNode.Left]++; } else { _columnCounter[visitedNode.Left] = 1; } }
virtual protected void Visit(PredicateNode visitedNode) { }
private PredicateNode _nodeDuplicator(PredicateNode oldNode) => new PredicateNode(new List <string> { oldNode.Left }, x => new List <object> { oldNode.Right }, oldNode.Condition);
private int _countOccurrences(PredicateNode p1, List <PredicateNode> nodelist) { return(default);
private Boolean _isSame(PredicateNode p1, PredicateNode p2) { throw new NotImplementedException(); }
protected abstract T Visit(PredicateNode node);