Пример #1
0
        public int CompareTo(InlineDbCommandCondition other)
        {
            if (other == null)
            {
                return(1);
            }
            var otherLikeCondition = other as LikeCondition;

            if (otherLikeCondition == null)
            {
                return(DataAccessMethods.CompareCommandConditionTypes(this, other));
            }

            var behaviorResult = EwlStatics.Compare(behavior, otherLikeCondition.behavior);

            if (behaviorResult != 0)
            {
                return(behaviorResult);
            }
            var columnNameResult = EwlStatics.Compare(columnName, otherLikeCondition.columnName, comparer: StringComparer.InvariantCulture);

            return(columnNameResult != 0
                                       ? columnNameResult
                                       : EwlStatics.Compare(searchTerm, otherLikeCondition.searchTerm, comparer: StringComparer.InvariantCulture));
        }
        public int CompareTo(DbParameterValue other)
        {
            if (other == null)
            {
                return(1);
            }
            var valueResult = EwlStatics.Compare(value, other.value);

            return(valueResult != 0 ? valueResult : EwlStatics.Compare(dbTypeString, other.dbTypeString, comparer: StringComparer.InvariantCulture));
        }
Пример #3
0
        public int CompareTo(InlineDbCommandColumnValue other)
        {
            if (other == null)
            {
                return(1);
            }
            var nameResult = EwlStatics.Compare(columnName, other.columnName, comparer: StringComparer.InvariantCulture);

            return(nameResult != 0 ? nameResult : EwlStatics.Compare(value, other.value));
        }
Пример #4
0
        public int CompareTo(InlineDbCommandCondition other)
        {
            if (other == null)
            {
                return(1);
            }
            var otherEqualityCondition = other as EqualityCondition;

            if (otherEqualityCondition == null)
            {
                return(DataAccessMethods.CompareCommandConditionTypes(this, other));
            }

            return(EwlStatics.Compare(columnValue, otherEqualityCondition.columnValue));
        }
        public int CompareTo(InlineDbCommandCondition other)
        {
            if (other == null)
            {
                return(1);
            }
            var otherInCondition = other as InCondition;

            if (otherInCondition == null)
            {
                return(DataAccessMethods.CompareCommandConditionTypes(this, other));
            }

            var columnNameResult = EwlStatics.Compare(columnName, otherInCondition.columnName, comparer: StringComparer.InvariantCulture);

            return(columnNameResult != 0 ? columnNameResult : EwlStatics.Compare(subQuery, otherInCondition.subQuery, comparer: StringComparer.InvariantCulture));
        }
Пример #6
0
        public int CompareTo(InlineDbCommandCondition other)
        {
            if (other == null)
            {
                return(1);
            }
            var otherInequalityCondition = other as InequalityCondition;

            if (otherInequalityCondition == null)
            {
                return(DataAccessMethods.CompareCommandConditionTypes(this, other));
            }

            var opResult = EwlStatics.Compare(op, otherInequalityCondition.op);

            return(opResult != 0 ? opResult : EwlStatics.Compare(columnValue, otherInequalityCondition.columnValue));
        }
 internal static int CompareCommandConditionTypes(InlineDbCommandCondition x, InlineDbCommandCondition y)
 {
     return(EwlStatics.Compare(x.GetType().Name, y.GetType().Name, comparer: StringComparer.InvariantCulture));
 }