Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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;
        }