Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of <see cref="DbJoinClause"/> class.
 /// </summary>
 /// <param name="kind">The operation of SQL JOIN.</param>
 /// <param name="left">The left operand.</param>
 /// <param name="right">The right operand.</param>
 /// <param name="on">The SQL JOIN column mappings.</param>
 public DbJoinClause(DbJoinKind kind, DbFromClause left, DbFromClause right, IReadOnlyList <ColumnMapping> on)
 {
     Kind  = kind;
     Left  = left;
     Right = right;
     On    = on;
 }
Exemplo n.º 2
0
 private DbSelectStatement(Model model, IReadOnlyList <ColumnMapping> select, DbFromClause from, DbExpression where, IReadOnlyList <DbExpressionSort> orderBy, int offset, int fetch, bool isSimple)
     : base(model)
 {
     Select   = select;
     From     = from;
     Where    = where;
     OrderBy  = orderBy;
     Offset   = offset;
     Fetch    = fetch;
     IsSimple = isSimple && From != null && offset == -1 && fetch == -1;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of <see cref="DbSelectStatement"/> class.
 /// </summary>
 /// <param name="model">The model of this query.</param>
 /// <param name="select">The column mappings of the SELECT statement.</param>
 /// <param name="from">The FROM clause.</param>
 /// <param name="where">The WHERE expression.</param>
 /// <param name="groupBy">The GROUP BY list.</param>
 /// <param name="having">The HAVING expression.</param>
 /// <param name="orderBy">The ORDER BY list.</param>
 /// <param name="offset">Specifies how many rows to skip within the query result.</param>
 /// <param name="fetch">Specifies how many rows to return in the query result.</param>
 public DbSelectStatement(Model model, IReadOnlyList <ColumnMapping> select, DbFromClause from, DbExpression where, IReadOnlyList <DbExpression> groupBy, DbExpression having, IReadOnlyList <DbExpressionSort> orderBy, int offset, int fetch)
     : this(model, select, from, where, orderBy, offset, fetch, false)
 {
     GroupBy = groupBy;
     Having  = having;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of <see cref="DbSelectStatement"/> class.
 /// </summary>
 /// <param name="model">The model of this query.</param>
 /// <param name="select">The column mappings of the SELECT statement.</param>
 /// <param name="from">The FROM clause.</param>
 /// <param name="where">The WHERE expression.</param>
 /// <param name="orderBy">The ORDER BY list.</param>
 /// <param name="offset">Specifies how many rows to skip within the query result.</param>
 /// <param name="fetch">Specifies how many rows to return in the query result.</param>
 public DbSelectStatement(Model model, IReadOnlyList <ColumnMapping> select, DbFromClause from, DbExpression where, IReadOnlyList <DbExpressionSort> orderBy, int offset, int fetch)
     : this(model, select, from, where, orderBy, offset, fetch, true)
 {
 }