Ejemplo n.º 1
0
 /// <summary>
 ///   构造
 /// </summary>
 /// <param name = "fieldName">字段名</param>
 /// <param name = "operator">表达式操作符</param>
 /// <param name = "value">值</param>
 /// <param name = "nextUnionType">与下一个表达式的联合类型<see cref = "WhereUnionType" /></param>
 public FieldCondition(string fieldName, OperatorType @operator, object value, WhereUnionType @nextUnionType)
 {
     FieldName = fieldName;
     Operator = @operator;
     Value = value;
     NextUnionType = nextUnionType;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 获取查询条件逻辑符号
 /// </summary>
 /// <param name = "wut">逻辑类型</param>
 /// <returns>符号</returns>
 public static string GetWhereUnionType(WhereUnionType wut)
 {
     return wut == WhereUnionType.And ? "AND" : "OR";
 }
        /// <summary>
        ///   增加查询组
        /// </summary>
        /// <param name = "fieldConditions">字段结构集合<see cref = "FieldConditionCollections" /></param>
        /// <param name = "nextUnionType">下个查询组的条件连接</param>
        public void Add(FieldConditionCollections fieldConditions, WhereUnionType @nextUnionType)
        {
            var queryGroupObject = new QueryGroupCondition(fieldConditions, @nextUnionType);

            Add(queryGroupObject);
        }
Ejemplo n.º 4
0
 /// <summary>
 ///   构造
 /// </summary>
 /// <param name = "fieldConditions">字段结构集合<see cref = "FieldConditionCollections" /></param>
 /// <param name = "nextUnionType">下个查询组的条件连接</param>
 public QueryGroupCondition(FieldConditionCollections fieldConditions, WhereUnionType @nextUnionType)
 {
     FieldConditions = fieldConditions;
     NextUnionType = @nextUnionType;
 }
Ejemplo n.º 5
0
 /// <summary>
 ///   构造
 /// </summary>
 /// <param name = "fieldName">字段名</param>
 /// <param name = "operator">表达式操作符</param>
 /// <param name = "value">值</param>
 /// <param name = "nextUnionType">与下一个表达式的联合类型<see cref = "WhereUnionType" /></param>
 public FieldCondition(string fieldName, OperatorType @operator, object value, WhereUnionType @nextUnionType)
 {
     FieldName     = fieldName;
     Operator      = @operator;
     Value         = value;
     NextUnionType = nextUnionType;
 }
Ejemplo n.º 6
0
 /// <summary>
 ///   构造
 /// </summary>
 /// <param name = "fieldConditions">字段结构集合<see cref = "FieldConditionCollections" /></param>
 /// <param name = "nextUnionType">下个查询组的条件连接</param>
 public QueryGroupCondition(FieldConditionCollections fieldConditions, WhereUnionType @nextUnionType)
 {
     FieldConditions = fieldConditions;
     NextUnionType   = @nextUnionType;
 }
Ejemplo n.º 7
0
        /// <summary>
        ///   增加
        /// </summary>
        /// <param name = "fieldName">字段名</param>
        /// <param name = "operator">表达式操作符</param>
        /// <param name = "value">值</param>
        /// <param name = "nextUnionType">与下一个表达式的联合类型<see cref = "WhereUnionType" /></param>
        public void Add(string fieldName, OperatorType @operator, object value, WhereUnionType @nextUnionType)
        {
            var fieldObject = new FieldCondition(fieldName, @operator, value, @nextUnionType);

            Add(fieldObject);
        }