public string Apply(List <object> parameters, IDialect dialect) { var sql = string.Format("{0} {1} {2}", _property.ColumnName, _operator, dialect.CreateParameter("p" + parameters.Count)); parameters.Add(_property.ToParameter(_value)); return(sql); }
public string Apply(List <object> parameters, IDialect dialect) { var sql = string.Format("{0} = {1}", _property.ColumnName, dialect.CreateParameter("p" + parameters.Count)); parameters.Add(_id); return(sql); }
public string Apply(List <object> parameters, IDialect dialect) { var sql = dialect.RegexMatch(_property.ColumnName, dialect.CreateParameter("p" + parameters.Count)); parameters.Add(_property.ToParameter(_value)); return(sql); }
public string Apply(List <object> parameters, IDialect dialect) { var commaDelimited = string.Join(",", _values .Select(x => { var index = parameters.Count; parameters.Add(_property.ToParameter(x)); return(dialect.CreateParameter("p" + index)); })); return(new StringBuilder() .Append(_property.ColumnName) .Append(_not ? " NOT " : "") .Append(" IN (") .Append(commaDelimited) .Append(")") .ToString()); }