Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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());
        }