/// <summary> /// 大于等于条件解析 /// </summary> /// <param name="condition">需要解析的条件对象</param> /// <returns>返回解析后的条件字符串</returns> protected override string LargeEqualParse(LargeEqualCondition condition) { StringBuilder conditionStr = new StringBuilder(" "); string queryColName = condition.SearchColumn.CurrentSearcher.TableName + "." + condition.SearchColumn.ColumnName; if (string.IsNullOrEmpty(condition.SearchColumn.ConditionString)) { conditionStr.Append(queryColName); } else { conditionStr.Append(condition.SearchColumn.ConditionString.Replace(SQLPlaceholder.ColName, queryColName)); } conditionStr.Append(" >= "); if (condition.ParamValue is SearchColumn) { SearchColumn tmpColumn = (SearchColumn)condition.ParamValue; string valueColName = tmpColumn.CurrentSearcher.TableName + "." + tmpColumn.ColumnName; conditionStr.Append(valueColName); } else { string paramName = "P" + Guid.NewGuid().ToString().ToLower().Replace("-", ""); conditionStr.Append("@" + paramName); ParamCollection.Add(new MySqlParameter(paramName, condition.ParamValue)); } conditionStr.Append(" "); return(conditionStr.ToString()); }
/// <summary> /// 大于等于条件解析 /// </summary> /// <param name="condition">需要解析的条件对象</param> /// <returns>返回解析后的条件字符串</returns> protected override string LargeEqualParse(LargeEqualCondition condition) { StringBuilder conditionStr = new StringBuilder(" "); string queryColName = condition.SearchColumn.CurrentSearcher.TableName + "." + condition.SearchColumn.ColumnName; if (string.IsNullOrEmpty(condition.SearchColumn.ConditionString)) { conditionStr.Append(queryColName); } else { conditionStr.Append(condition.SearchColumn.ConditionString.Replace(SQLPlaceholder.ColName, queryColName)); } conditionStr.Append(" >= "); if (condition.ParamValue is SearchColumn) { SearchColumn tmpColumn = (SearchColumn)condition.ParamValue; string valueColName = tmpColumn.CurrentSearcher.TableName + "." + tmpColumn.ColumnName; conditionStr.Append(valueColName); } else { string paramName = "P" + Guid.NewGuid().ToString().ToLower().Replace("-", ""); conditionStr.Append(":" + paramName); ParamCollection.Add(new DBParam(paramName, condition.ParamValue)); } conditionStr.Append(" "); return conditionStr.ToString(); }
/// <summary> /// 大于等于条件 /// </summary> /// <param name="relation">条件关系</param> /// <param name="column">查询字段对象</param> /// <param name="paramVal">比较的值</param> /// <returns>返回大于等于条件对象</returns> public static LargeEqualCondition LargeEqual(ConditionRelation relation, SearchColumn column, object paramVal) { LargeEqualCondition cond = new LargeEqualCondition(relation, column, paramVal); return cond; }
/// <summary> /// 大于等于条件 /// </summary> /// <param name="paramVal">比较的值</param> /// <returns>返回大于等于条件对象</returns> public static LargeEqualCondition LargeEqual(object paramVal) { LargeEqualCondition cond = new LargeEqualCondition(paramVal); return cond; }
/// <summary> /// 大于等于条件 /// </summary> /// <param name="relation">条件关系</param> /// <param name="column">查询字段对象</param> /// <param name="paramVal">比较的值</param> /// <returns>返回大于等于条件对象</returns> public static LargeEqualCondition LargeEqual(ConditionRelation relation, SearchColumn column, object paramVal) { LargeEqualCondition cond = new LargeEqualCondition(relation, column, paramVal); return(cond); }
/// <summary> /// 大于等于条件 /// </summary> /// <param name="paramVal">比较的值</param> /// <returns>返回大于等于条件对象</returns> public static LargeEqualCondition LargeEqual(object paramVal) { LargeEqualCondition cond = new LargeEqualCondition(paramVal); return(cond); }