Appearance
SelectColumns Class
Definition
Represents a collection of columns used to generate the SELECT projection portion of a query.
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Properties
| Name | Description |
|---|---|
Columns | Gets or sets the list of columns to be included in the SELECT clause. |
Methods
| Name | Description |
|---|---|
void AddColumn(Column column) | Adds an existing Column instance to the collection. |
void AddColumn(string name, string alias, string comment) | Adds a column to the collection using a name and optional alias and comment. |
SelectColumns Create(IEnumerable<string> columns) | Creates a SelectColumns instance with one entry for each column name provided. |
SelectColumns Create(string name) | Creates a SelectColumns instance containing a single column. |
List<string> GetColumns() | Returns the list of column names contained in this selection. |
string ToString() | Renders the SELECT column list as a string. |
Remarks
Use one of the Create or Create factory methods to construct instances. Columns can be added via AddColumn or AddColumn.
The ToString method renders a comma-separated list of column names, optionally including aligned inline comments when Configuration.PrettySQL is enabled.