DmJoinQuery`4
Namespace: MJCZone.DapperMatic.Dml
Assembly: MJCZone.DapperMatic
Summary
Rows of 4 models joined by conditions written out: one <c>SELECT</c>, built up by <c>Where</c>, <c>OrderBy</c>, <c>Skip</c>, <c>Take</c> and <c>Distinct</c> over all the joined rows, read as tuples or by <c>Select</c>.
sealed public
Contents
Methods (19)
Methods
| Method | Summary |
|---|---|
| Where | |
| OrderBy | |
| OrderByDescending | |
| ThenBy | |
| ThenByDescending | |
| Skip | Skips rows. |
| Take | Returns at most a number of rows. |
| Distinct | Returns each distinct combination of rows once. |
| Select | |
| GroupBy | |
| ToListAsync | Reads the joined rows. |
| FirstAsync | Reads the first joined rows: in the query's order, or the first model's key order if it has none. |
| CountAsync | Counts the joined rows. |
| ExistsAsync | Tells whether there are any joined rows. |
| ToSql | Writes the SQL that CancellationToken) runs, without running it.... |
| GetType | |
| ToString | |
| Equals | |
| GetHashCode |
Where
Where()OrderBy
OrderBy()OrderByDescending
OrderByDescending()ThenBy
ThenBy()ThenByDescending
ThenByDescending()Skip
Skips rows.
DmJoinQuery<T1, T2, T3, T4> Skip(int count)Parameters
- count (int) - The number of rows to skip.
Returns
Type: DmJoinQuery<T1, T2, T3, T4>
The query.
Take
Returns at most a number of rows.
DmJoinQuery<T1, T2, T3, T4> Take(int count)Parameters
- count (int) - The most rows to return.
Returns
Type: DmJoinQuery<T1, T2, T3, T4>
The query.
Distinct
Returns each distinct combination of rows once.
DmJoinQuery<T1, T2, T3, T4> Distinct()Returns
Type: DmJoinQuery<T1, T2, T3, T4>
The query.
Select
Select()GroupBy
GroupBy()ToListAsync
Reads the joined rows.
Task<List<(T1, T2?, T3?, T4?)>> ToListAsync(
IDbTransaction tx,
CancellationToken cancellationToken)Parameters
- tx (IDbTransaction) - The transaction to use, or null.
- cancellationToken (CancellationToken) - The cancellation token.
Returns
Type: Task<List<(T1, T2?, T3?, T4?)>>
The rows, a tuple per combination.
FirstAsync
Reads the first joined rows: in the query's order, or the first model's key order if it has none.
Task<Nullable<(T1, T2, T3, T4)>> FirstAsync(
IDbTransaction tx,
CancellationToken cancellationToken)Parameters
- tx (IDbTransaction) - The transaction to use, or null.
- cancellationToken (CancellationToken) - The cancellation token.
Returns
Type: Task<Nullable<(T1, T2, T3, T4)>>
The rows, or null if there are none.
CountAsync
Counts the joined rows.
Task<long> CountAsync(IDbTransaction tx, CancellationToken cancellationToken)Parameters
- tx (IDbTransaction) - The transaction to use, or null.
- cancellationToken (CancellationToken) - The cancellation token.
Returns
Type: Task<long>
The number of rows.
ExistsAsync
Tells whether there are any joined rows.
Task<bool> ExistsAsync(IDbTransaction tx, CancellationToken cancellationToken)Parameters
- tx (IDbTransaction) - The transaction to use, or null.
- cancellationToken (CancellationToken) - The cancellation token.
Returns
Type: Task<bool>
True if there are.
ToSql
Writes the SQL that CancellationToken) runs, without running it.
DmStatement ToSql()Returns
Type: DmStatement
The SQL and its parameters.
GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
GetHashCode()