예제 #1
0
        /// <summary>
        /// Creates a new GetDate() function to be executed on the database server
        /// </summary>
        /// <returns></returns>
        public static DBFunction GetDate()
        {
            DBFunction func = new DBFunctionRef();

            func.KnownFunction = Tech.Data.Function.GetDate;

            return(func);
        }
예제 #2
0
        /// <summary>
        /// Creates a new LastID function to be executed on the database server
        /// </summary>
        /// <returns></returns>
        public static DBFunction LastID()
        {
            DBFunction func = new DBFunctionRef();

            func.KnownFunction = Tech.Data.Function.LastID;

            return(func);
        }
예제 #3
0
        /// <summary>
        /// Creates a new IsNull function reference to be executed on the database server - ISNULL(match, otherwise)
        /// </summary>
        /// <param name="match"></param>
        /// <param name="otherwise"></param>
        /// <returns></returns>
        public static DBFunction IsNull(DBClause match, DBClause otherwise)
        {
            DBFunctionRef fref = new DBFunctionRef();

            fref.KnownFunction = Tech.Data.Function.IsNull;
            fref.Parameters.Add(match);
            fref.Parameters.Add(otherwise);

            return(fref);
        }
예제 #4
0
        /// <summary>
        /// Creates a new DBFunction reference for the known function and appends the provided parameters
        /// </summary>
        /// <param name="func"></param>
        /// <param name="parameters"></param>
        /// <returns></returns>
        public static DBFunction Function(Function func, params DBClause[] parameters)
        {
            DBFunction f = new DBFunctionRef();

            f.KnownFunction = func;
            if (null != parameters && parameters.Length > 0)
            {
                foreach (DBClause clause in parameters)
                {
                    f.Parameters.Add(clause);
                }
            }
            return(f);
        }
예제 #5
0
        /// <summary>
        /// Creates a new empty DBFunction reference
        /// </summary>
        /// <returns></returns>
        public static DBFunction Function()
        {
            DBFunction func = new DBFunctionRef();

            return(func);
        }