示例#1
0
        public virtual string BuildValue(IQueryValue value)
        {
            if (value == null)
            {
                return(null);
            }

            if (value is QAggregateField qAggrFld)
            {
                return(BuildValue(qAggrFld));
            }

            if (value is QField qFld)
            {
                return(BuildValue(qFld));
            }

            if (value is QConst qConst)
            {
                return(BuildValue(qConst));
            }

            if (value is QRawSql)
            {
                return(((QRawSql)value).SqlText);
            }

            throw new NotSupportedException("Unknown query value: " + value.GetType().ToString());
        }
示例#2
0
        public virtual string BuildValue(IQueryValue value)
        {
            if (value == null)
            {
                return(null);
            }

            if (value is QField)
            {
                return(BuildValue((QField)value));
            }

            if (value is QConst)
            {
                return(BuildValue((QConst)value));
            }

            if (value is QRawSql)
            {
                return(((QRawSql)value).SqlText);
            }

            throw new ArgumentException("Invalid query value", value.GetType().ToString());
        }