예제 #1
0
        ///// <summary>
        ///// 查询范围
        ///// </summary>
        ///// <param name="star">开始条数</param>
        ///// <param name="totalRecord">显示条数</param>
        ///// <returns></returns>
        //public KeyWordLimitItem Limit(uint star, uint totalRecord)
        //{
        //    KeyWordLimitItem item = new KeyWordLimitItem(star, totalRecord, this);
        //    return item;
        //}
        internal override void Tran(KeyWordInfomation info)
        {
            info.IsWhere = true;
            string ret = "";
            SelectCondition con = info.Condition as SelectCondition;

            for (int i = 0; i < paramhandles.Count; i++)
            {
                BQLParamHandle prm = paramhandles[i];
                string prmStr=prm.DisplayValue(info);
                ret +=prmStr ;
                if (i < paramhandles.Count - 1)
                {
                    ret += ",";
                }
                if (con != null)
                {
                    info.Condition.PrimaryKey.Add(prmStr);

                }
            }
            info.Condition.GroupBy.Append(ret);
            info.IsWhere = false;
            //return " group by " + ret;
        
        }
예제 #2
0
        /// <summary>
        /// 获取属性名
        /// </summary>
        /// <param name="parameter"></param>
        /// <returns></returns>
        private string GetKey(BQLParamHandle parameter)
        {
            BQLEntityParamHandle ehandle = parameter as BQLEntityParamHandle;

            if (!CommonMethods.IsNull(ehandle))
            {
                return(ehandle.PInfo.PropertyName);
            }
            BQLOtherParamHandle ohandle = parameter as BQLOtherParamHandle;

            if (!CommonMethods.IsNull(ohandle))
            {
                return(ohandle.ParamName);
            }
            return(parameter.DisplayValue(BQLValueItem.GetKeyInfo()));
        }
예제 #3
0
        internal override void Tran(KeyWordInfomation info)
        {
            info.IsWhere = true;
            StringBuilder condition = new StringBuilder();

            for (int i = 0; i < parameters.Length; i++)
            {
                BQLParamHandle prmHandle = parameters[i];
                condition.Append(prmHandle.DisplayValue(info));
                if (i < parameters.Length - 1)
                {
                    condition.Append(',');
                }
            }
            info.Condition.Orders.Append(condition.ToString());
            //return " order by " + condition.ToString();
            info.IsWhere = false;
        }
예제 #4
0
        internal override string DisplayValue(KeyWordInfomation info)
        {
            DelAggregateFunctionHandle handle = functionHandle;

            if (handle != null)
            {
                string strParam = null;
                if (!CommonMethods.IsNull(param))
                {
                    strParam = param.DisplayValue(info);
                }
                else
                {
                    strParam = "*";
                }
                if (this.ValueDbType == DbType.Object) //如果此函数为未知返回类型时候就自动转为字段类型
                {
                    _valueDbType = param.ValueDbType;
                }
                return(handle(strParam, info.DBInfo));
            }
            return(null);
        }