Esempio n. 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 = Perceiveit.Data.Function.GetDate;

            return(func);
        }
Esempio n. 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 = Perceiveit.Data.Function.LastID;

            return(func);
        }
Esempio n. 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 = Perceiveit.Data.Function.IsNull;
            fref.Parameters.Add(match);
            fref.Parameters.Add(otherwise);

            return(fref);
        }
Esempio n. 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);
        }
Esempio n. 5
0
        /// <summary>
        /// Creates a new empty DBFunction reference
        /// </summary>
        /// <returns></returns>
        public static DBFunction Function()
        {
            DBFunction func = new DBFunctionRef();

            return(func);
        }