public virtual string GetConditionOp(CheckOp condition) { var left = this.FormatTableAndColumn(condition.ColumnName); // get unique parameter name var parameterName = this.GetParameterName(condition.ColumnName); if (condition.Rank > 1) { parameterName += condition.Rank.ToString(); } return(left + condition.Operator + parameterName); }
private void SetRank(CheckOp condition) { var rank = 1; var columnName = condition.ColumnName; if (this is CheckOp && this.ColumnName == columnName) { rank += 1; } foreach (var subCondition in this.ChainedConditions) { if (subCondition.Condition is CheckOp && subCondition.Condition.ColumnName == columnName) { rank += 1; } } condition.Rank = rank; }