示例#1
0
        //
        // static factory methods
        //

        #region public static DBComparison Equal(DBClause from, DBClause to)
        /// <summary>
        /// Creates an equal comparison for the left and right clauses
        /// </summary>
        /// <param name="from"></param>
        /// <param name="to"></param>
        /// <returns></returns>
        public static DBComparison Equal(DBClause from, DBClause to)
        {
            DBBinaryComparisonRef compref = new DBBinaryComparisonRef();

            compref.Left            = from;
            compref.Right           = to;
            compref.CompareOperator = Tech.Data.Compare.Equals;

            return(compref);
        }
示例#2
0
        internal static DBComparison Compare()
        {
            DBBinaryComparisonRef comp = new DBBinaryComparisonRef();

            comp.Left            = null;
            comp.Right           = null;
            comp.CompareOperator = Tech.Data.Compare.Equals;

            return(comp);
        }
示例#3
0
        /// <summary>
        /// Creates a comparison operation between the left and right clauses
        /// </summary>
        /// <param name="from"></param>
        /// <param name="op"></param>
        /// <param name="to"></param>
        /// <returns></returns>
        public static DBComparison Compare(DBClause from, Compare op, DBClause to)
        {
            if (null == from)
            {
                throw new ArgumentNullException("from");
            }
            if (null == to)
            {
                throw new ArgumentNullException("to");
            }

            DBBinaryComparisonRef compref = new DBBinaryComparisonRef();

            compref.Left            = from;
            compref.Right           = to;
            compref.CompareOperator = op;

            return(compref);
        }