public void SelectTopPercent <T>(SqlFragment parent, SelectTopPercent <T> selectTopPercent) where T : IStatement { this.Script.Append("SELECT TOP ("); this.Script.AppendFragment(selectTopPercent.Percent, parent, this); this.Script.Append(") PERCENT"); ExpressionFormatter.FormatExpressionList(selectTopPercent.ColumnList, parent, this.Script, this); }
public SelectTopPercent <SingleExprSelectStatement> SelectTopPercent(Expression percent, Expression expression) { var statement = new SingleExprSelectStatement(this); var clause = new SelectTopPercent <SingleExprSelectStatement>(statement, percent, new[] { expression }); statement.FirstFragment = clause; return(clause); }
public SelectTopPercent <SelectStatement> SelectTopPercent( Expression percent, Expression expression, params Expression[] expressions) { var statement = new SelectStatement(this); var clause = new SelectTopPercent <SelectStatement>( statement, percent, Collection <Expression> .From(expression, expressions)); statement.FirstFragment = clause; return(clause); }