AbstractSelectSorter<T> Class
Abstract base class for SELECT sorters.
public abstract class AbstractSelectSorter<T> : SelectSorter<T>
where T : notnull
Type Parameters
- T
-
notnull
The type of the result set.
- Inheritance
-
Abstract
Select Sorter<T>
- Implements
Constructors
Abstract |
Abstract base class for SELECT sorters. |
Properties
Text |
Gets the SQL query text. |
Methods
Order |
Description copied from interface: SelectSorter
|
Execute() |
Description copied from interface: SelectTerminator
|
Limit(int) |
Description copied from interface: SelectTerminator
|
Limit |
Description copied from interface: SelectTerminator
|
Equals(object) | (Inherited from object) |
GetHashCode() | (Inherited from object) |
GetType() | (Inherited from object) |
MemberwiseClone() | (Inherited from object) |
ToString() | (Inherited from object) |
Constructors Detail
AbstractSelectSorter(string, Func<string, IEnumerable<T>>)
Abstract base class for SELECT sorters.
protected AbstractSelectSorter(string text, Func<string, IEnumerable<T>> executor)
Parameters
- text
- string
The SQL query text.
- executor
- Func<string, IEnumerable<T>>
The executor function.
Properties Detail
Text
Gets the SQL query text.
protected string Text { get; }
Property Value
Methods Detail
OrderBy(string[])
Description copied from interface: SelectSorter
Executes the query and gets the result in the order sorted by the specified columns.
public SelectTerminator<T> OrderBy(params string[] columns)
Parameters
- columns
- string[]
Returns
Description copied from interface: SelectSorter
The
T
objects representing the result of the query.
Implements
Remarks
Description copied from interface: SelectSorter
The result that this method returns represents that of
SELECT ... FROM ... ORDER BY
columns
.
Execute()
Description copied from interface: SelectTerminator
Executes the query and gets the result.
public IEnumerable<T> Execute()
Returns
Description copied from interface: SelectTerminator
The
T
objects representing the result of the query.
Implements
Limit(int)
Description copied from interface: SelectTerminator
Executes the query and limits the number of rows that the query returns.
public IEnumerable<T> Limit(int limit)
Parameters
- limit
- int
Returns
Description copied from interface: SelectTerminator
The
T
objects representing the limited result of the query.
Implements
LimitOffset(int, int)
Description copied from interface: SelectTerminator
Executes the query and limits the number of rows that the query returns and specifies the starting offset.
public IEnumerable<T> LimitOffset(int limit, int offset)
Parameters
- limit
- int
- offset
- int
Returns
Description copied from interface: SelectTerminator
The
T
objects representing the limited result of the query.