Example #1
0
        //
        // static factory methods
        //

        #region public static DBTop Number(int count)
        /// <summary>
        /// Creates and returns a new TOP [count] statement
        /// </summary>
        /// <param name="count">The number of rows to return</param>
        /// <returns></returns>
        public static DBTop Number(int count)
        {
            DBTop top = new DBTopRef();

            top.TopValue = count;
            top.Type     = TopType.Count;
            return(top);
        }
Example #2
0
        /// <summary>
        /// Creates and returns a new TOP [percent] PERCENT statement
        /// </summary>
        /// <param name="percent"></param>
        /// <returns></returns>
        public static DBTop Percent(double percent)
        {
            DBTop top = new DBTopRef();

            top.TopValue = percent;
            top.Type     = TopType.Percent;
            return(top);
        }
Example #3
0
        /// <summary>
        /// Creates a returns a new TOP (LIMITS) statment with the specified restrictions
        /// </summary>
        /// <param name="value"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static DBTop Top(double value, TopType type)
        {
            DBTop top = new DBTopRef();

            top.Type     = type;
            top.TopValue = value;

            return(top);
        }
Example #4
0
        internal static DBClause Top()
        {
            DBTopRef top = new DBTopRef();

            return(top);
        }