예제 #1
0
 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);
 }
예제 #2
0
파일: SharpBatch.cs 프로젝트: w0lya/sharpql
        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);
        }
예제 #3
0
파일: SharpBatch.cs 프로젝트: w0lya/sharpql
        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);
        }