Esempio n. 1
0
 /// <summary>
 /// 空 ISNULL
 /// </summary>
 /// <param name="fieldName"></param>
 /// <returns></returns>
 public static WhereExpressionSQL IsNull(string fieldName)
 {
     WhereExpressionSQL where = new WhereExpressionSQL();
     return where.IsNull(fieldName);
 }
Esempio n. 2
0
 /// <summary>
 /// LIKE % 左匹配
 /// </summary>
 /// <param name="fieldName"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 public static WhereExpressionSQL LikeLeft(string fieldName, string value)
 {
     WhereExpressionSQL where = new WhereExpressionSQL();
     return where.LikeLeft(fieldName, value);
 }
Esempio n. 3
0
 /// <summary>
 /// 大于等于>=
 /// </summary>
 /// <param name="fieldName"></param>
 /// <param name="type"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 public static WhereExpressionSQL GTE(string fieldName, DbType type, object value)
 {
     WhereExpressionSQL where = new WhereExpressionSQL();
     return where.GTE(fieldName, type, value);
 }
Esempio n. 4
0
 /// <summary>
 /// IN
 /// </summary>
 /// <param name="fieldName"></param>
 /// <param name="type"></param>
 /// <param name="values"></param>
 /// <returns></returns>
 public static WhereExpressionSQL In(string fieldName, DbType type, params object[] values)
 {
     WhereExpressionSQL where = new WhereExpressionSQL();
     return where.In(fieldName, type, values);
 }
Esempio n. 5
0
 /// <summary>
 /// BETWEEN AND
 /// </summary>
 /// <param name="fieldName"></param>
 /// <param name="type"></param>
 /// <param name="leftValue"></param>
 /// <param name="rightValue"></param>
 /// <returns></returns>
 public static WhereExpressionSQL Between(string fieldName, DbType type, object leftValue, object rightValue)
 {
     WhereExpressionSQL where = new WhereExpressionSQL();
     return where.Between(fieldName, type, leftValue, rightValue);
 }
Esempio n. 6
0
 /// <summary>
 /// AND
 /// </summary>
 /// <param name="expressions"></param>
 /// <returns></returns>
 public static WhereExpressionSQL And(params WhereExpressionSQL[] expressions)
 {
     WhereExpressionSQL where = new WhereExpressionSQL();
     return where.And(expressions);
 }
Esempio n. 7
0
 /// <summary>
 /// 空条件
 /// </summary>
 /// <returns></returns>
 public static WhereExpressionSQL Empty()
 {
     WhereExpressionSQL where = new WhereExpressionSQL();
     return where.Empty();
 }
Esempio n. 8
0
 /// <summary>
 /// 或 OR
 /// </summary>
 /// <param name="where"></param>
 /// <param name="left"></param>
 /// <param name="right"></param>
 /// <returns></returns>
 public static WhereExpressionSQL Or(this WhereExpressionSQL where, WhereExpressionSQL left, WhereExpressionSQL right)
 {
     if (where == null)
     {
         return Or(left, right);
     }
     List<IDbDataParameter> list = new List<IDbDataParameter>();
     list.AddRange(left.GetParameters());
     list.AddRange(right.GetParameters());
     return where.AddExpression(string.Format("({0}) OR ({1})", left.GetExpression(), right.GetExpression()), list.ToArray());
 }
Esempio n. 9
0
 /// <summary>
 /// 或 OR
 /// </summary>
 /// <param name="left"></param>
 /// <param name="right"></param>
 /// <returns></returns>
 public static WhereExpressionSQL Or(WhereExpressionSQL left, WhereExpressionSQL right)
 {
     WhereExpressionSQL where = new WhereExpressionSQL();
     return where.Or(left, right);
 }