public void SelectDistinctTopPercent <T>(SqlFragment parent, SelectDistinctTopPercent <T> selectDistinctTopPercent) where T : IStatement { this.Script.Append("SELECT DISTINCT TOP ("); this.Script.AppendFragment(selectDistinctTopPercent.Percent, parent, this); this.Script.Append(") PERCENT"); ExpressionFormatter.FormatExpressionList(selectDistinctTopPercent.ColumnList, parent, this.Script, this); }
public void NotInValuesPredicate(SqlFragment parent, NotInValuesPredicate notInValuesPredicate) { notInValuesPredicate.Expression.Build(parent, this); this.Script.Append("NOT IN("); ExpressionFormatter.FormatExpressionList(notInValuesPredicate.Values, notInValuesPredicate, this.Script, this); this.Script.Append(")"); }
public void InValuesPredicate(SqlFragment parent, InValuesPredicate inValuesPredicate) { inValuesPredicate.Expression.Build(parent, this); this.Script.Append("IN("); ExpressionFormatter.FormatExpressionList(inValuesPredicate.ValueList, inValuesPredicate, this.Script, this); this.Script.Append(")"); }
public void SelectDistinctTop <T>(SqlFragment parent, SelectDistinctTop <T> selectDistinctTop) where T : IStatement { this.Script.Append("SELECT DISTINCT TOP ("); this.Script.AppendFragment(selectDistinctTop.Count, parent, this); this.Script.Append(")"); ExpressionFormatter.FormatExpressionList(selectDistinctTop.Columns, parent, this.Script, this); }
public void InsertValuesStart(SqlFragment parent, InsertValuesStart insertValuesStart) { this.Script.AppendLine(); this.Script.AppendLine("VALUES("); ExpressionFormatter.FormatExpressionList(insertValuesStart.ExpressionList, insertValuesStart, this.Script, this); this.Script.Append(")"); }
public void InsertAdvancedClause(SqlFragment parent, InsertAdvancedClause insertAdvancedClause) { this.Script.OpenParen(); Column[] cols = insertAdvancedClause.Args.Select(v => v.Column).ToArray(); ExpressionFormatter.FormatColumnList(cols, insertAdvancedClause, this.Script, this); this.Script.CloseParen(); this.Script.Append(TSqlKeyword.VALUES).OpenParen(); Expression[] values = insertAdvancedClause.Args.Select(v => v.Expression).ToArray(); ExpressionFormatter.FormatExpressionList(values, insertAdvancedClause, this.Script, this); this.Script.CloseParen(); }
public void ExpressionAssignValues(SqlFragment parent, ExpressionAssignValues expressionAssignValues) { IEnumerable <Column> columns = expressionAssignValues.ValueAssignList.Select(v => v.Column); IEnumerable <Expression> expressions = expressionAssignValues.ValueAssignList.Select(v => v.Expression); this.Script.OpenParen(); ExpressionFormatter.FormatColumnList(columns, expressionAssignValues, this.Script, this); this.Script.CloseParen(); this.Script.AppendLine("VALUES ("); ExpressionFormatter.FormatExpressionList(expressions, expressionAssignValues, this.Script, this); this.Script.CloseParen(); }
public void OrderBy(SqlFragment parent, OrderBy orderBy) { if ((parent is OrderBy) == false) { this.Script.LineAppendLine(TSqlKeyword.ORDER_BY); } else { this.Script.LineAppend(" , "); } ExpressionFormatter.FormatExpressionList(orderBy.Expressions, orderBy, this.Script, this, orderBy.Direction); }
public void BinaryChecksumAggregateFunction(SqlFragment parent, BinaryChecksumFunction function) { this.Script.Append("BINARY_CHECKSUM("); ExpressionFormatter.FormatExpressionList(function.Arguments, function, this.Script, this); this.Script.Append(")"); }
public void SelectDistinct <T>(SqlFragment parent, SelectDistinct <T> selectDistinct) where T : IStatement { this.Script.LineAppendLine(TSqlKeyword.SELECT_DISTINCT); ExpressionFormatter.FormatExpressionList(selectDistinct.ColumnList, parent, this.Script, this); }
public void GroupByClause <T>(SqlFragment parent, GroupByClause <T> groupByClause) where T : IStatement { this.Script.LineAppendLine(TSqlKeyword.GROUP_BY); ExpressionFormatter.FormatExpressionList(groupByClause.ExpressionList, groupByClause, this.Script, this); }
public void Select <T>(SqlFragment parent, Select <T> element) where T : IStatement { this.Script.LineAppendLine(TSqlKeyword.SELECT); ExpressionFormatter.FormatExpressionList(element.ExpressionList, parent, this.Script, this); }
public void SimpleFunction(SqlFragment parent, SimpleFunction function) { this.Script.AppendFormat("{0}(", function.FunctionName); ExpressionFormatter.FormatExpressionList(function.Arguments, function, this.Script, this); this.Script.Append(")"); }
public void NextValues(SqlFragment parent, NextValues nextValues) { this.Script.Append("("); ExpressionFormatter.FormatExpressionList(nextValues.ExpressionList, parent, this.Script, this); this.Script.Append(")"); }