public static BQLComparItem operator <=(BQLValueItem handle, object value)
        {
            BQLValueItem oValue = ToValueItem(value);

            UnityDbType(handle, oValue);
            BQLComparItem fHandle = new BQLComparItem(FunctionManager.DoLessThen, new BQLValueItem[] { handle, oValue });

            //fHandle.PriorityLevel = 5;
            fHandle.PriorityLevel = OperatorPrecedenceUnit.GetPrecedence("<=");
            return(fHandle);
        }
        public static BQLOperatorHandle operator /(BQLValueItem handle, object value)
        {
            BQLValueItem oValue = ToValueItem(value);

            UnityDbType(handle, oValue);
            BQLOperatorHandle fHandle = new BQLOperatorHandle(FunctionManager.DoDiv, new BQLValueItem[] { handle, oValue });

            //fHandle.PriorityLevel = 7;
            fHandle.PriorityLevel = OperatorPrecedenceUnit.GetPrecedence("/");
            return(fHandle);
        }
        public static BQLComparItem operator |(BQLValueItem handle, BQLValueItem value)
        {
            List <BQLValueItem> lstValues = new List <BQLValueItem>();

            if (!CommonMethods.IsNull(handle))
            {
                lstValues.Add(handle);
            }
            if (!CommonMethods.IsNull(value))
            {
                lstValues.Add(value);
            }
            BQLComparItem fHandle = new BQLComparItem(FunctionManager.DoOr, lstValues);

            //fHandle.PriorityLevel = 4;
            fHandle.PriorityLevel = OperatorPrecedenceUnit.GetPrecedence("|");
            return(fHandle);
        }
Exemple #4
0
        /// <summary>
        /// 普通连接函数
        /// </summary>
        /// <param name="handle">函数</param>
        /// <param name="connect">连接符</param>
        /// <param name="operLevel">优先级</param>
        /// <returns></returns>
        private static string CustomerConnectFunction(IList <BQLValueItem> parameters, string connect, KeyWordInfomation info, int operLevel)
        {
            //BQLValueItem[] parameters = fHandle.GetParameters();
            string values = "";

            for (int i = 0; i < parameters.Count; i++)
            {
                BQLValueItem item = parameters[i];

                //values += item.DisplayValue(info);
                values += OperatorPrecedenceUnit.FillBreak(item, i == 0, operLevel, info);
                if (i < parameters.Count - 1)
                {
                    values += connect;
                }
            }

            return(values);
        }