Class QueryColumnExpressionCollection
Collection of column expressions.
Inheritance
Implements
Inherited Members
Namespace: Terrasoft.Core.DB
Assembly: Terrasoft.Core.dll
Syntax
public class QueryColumnExpressionCollection : Collection<QueryColumnExpression>, IList<QueryColumnExpression>, ICollection<QueryColumnExpression>, IList, ICollection, IReadOnlyList<QueryColumnExpression>, IReadOnlyCollection<QueryColumnExpression>, IEnumerable<QueryColumnExpression>, IEnumerable, ICloneable
Constructors
QueryColumnExpressionCollection()
Initializes a new QueryColumnExpressionCollection instance.
Declaration
public QueryColumnExpressionCollection()
QueryColumnExpressionCollection(QueryColumnExpressionCollection)
Initializes a new QueryColumnExpressionCollection instance that is a clone of the passed-in collection of column expressions.
Declaration
public QueryColumnExpressionCollection(QueryColumnExpressionCollection source)
Parameters
Type | Name | Description |
---|---|---|
QueryColumnExpressionCollection | source |
Methods
Add(String)
Adds the expression with the specified alias in the current collection of column expressions.
Declaration
public void Add(string sourceColumnAlias)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceColumnAlias | The alias of the column expression that is added in the current collection. |
Add(String, String)
In the current collection of column expressions, adds the expression with the specified alias from the specified source.
Declaration
public void Add(string sourceAlias, string sourceColumnAlias)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceAlias | The alias of the source. |
System.String | sourceColumnAlias | The alias of the column. |
Add(Query)
In the current collection of column expressions, adds the expression for the passed-in random subquery.
Declaration
public void Add(Query subSelectQuery)
Parameters
Type | Name | Description |
---|---|---|
Query | subSelectQuery | The random subquery for which the column expression is added. |
Add(QueryFunction)
In the current collection of column expressions, adds the expression for the passed-in expression function.
Declaration
public void Add(QueryFunction queryFunction)
Parameters
Type | Name | Description |
---|---|---|
QueryFunction | queryFunction | The expression function for which the column expression is added. |
Add(QueryParameter)
In the current collection of column expressions, adds the expression for the specified query parameter.
Declaration
public void Add(QueryParameter parameter)
Parameters
Type | Name | Description |
---|---|---|
QueryParameter | parameter | The query parameter for which the column expression is added. |
Add(Select)
In the current collection of column expressions, adds the expression for the passed-in select subquery.
Declaration
public void Add(Select subSelect)
Parameters
Type | Name | Description |
---|---|---|
Select | subSelect | The select subquery for which the column expression is added. |
AddExpression(IQueryColumnExpressionConvertible)
Adds the passed-in expression in the current collection of column expressions.
Declaration
public void AddExpression(IQueryColumnExpressionConvertible expression)
Parameters
Type | Name | Description |
---|---|---|
IQueryColumnExpressionConvertible | expression | The column expression that is added in the current collection. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
AddExpressionsRange(IEnumerable<IQueryColumnExpressionConvertible>)
In the current collection of column expressions, adds the range of expressions from the specified enumerator.
Declaration
public void AddExpressionsRange(IEnumerable<IQueryColumnExpressionConvertible> expressions)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IQueryColumnExpressionConvertible> | expressions | The enumerator of column expressions that are added in the current collection. |
AddRange(IEnumerable<String>)
In the current collection of column expressions, adds the range of expressions with aliases from the specified enumerator.
Declaration
public void AddRange(IEnumerable<string> sourceColumnAliases)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | sourceColumnAliases | The enumerator of aliases of column expressions that are added in the current collection. |
AddRange(IEnumerable<QueryColumnExpression>)
In the current collection of column expressions, adds the range of expressions from the specified enumerator.
Declaration
public void AddRange(IEnumerable<QueryColumnExpression> columnExpressions)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<QueryColumnExpression> | columnExpressions | The enumerator of column expressions that are added in the current collection. |
AddRange(IEnumerable<QueryParameter>)
In the current collection of column expressions, adds the range of expressions for parameters the passed-in enumerator.
Declaration
public void AddRange(IEnumerable<QueryParameter> parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<QueryParameter> | parameters | The enumerator of parameters for which the expressions are added in the current collection. |
Clone()
Creates the clone of the current QueryColumnExpressionCollection instance.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | A new QueryColumnExpressionCollection instance that represents the copy of the current instance. |
ExistsByAlias(String)
Determines whether the current collection of column expressions contains the expression with the specified alias.
Declaration
public bool ExistsByAlias(string alias)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The alias of the column expression to get. |
Returns
Type | Description |
---|---|
System.Boolean |
|
FindByAlias(String)
From the current collection of column expressions gets the expression with the specified alias.
Declaration
public QueryColumnExpression FindByAlias(string alias)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The alias of the return column expression. |
Returns
Type | Description |
---|---|
QueryColumnExpression | The column expression with the |
GetByAlias(String)
From the current collection of column expressions gets the expression with the specified alias. If the expression is not found in the collection, an exception is thrown.
Declaration
public QueryColumnExpression GetByAlias(string alias)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The alias of the return column expression. |
Returns
Type | Description |
---|---|
QueryColumnExpression | The column expression with the |
Exceptions
Type | Condition |
---|---|
ArgumentNullOrEmptyException | If the column expression with the |
ItemNotFoundException | If the empty value or |
GetUniqueAlias(String, Int32)
For the specified alias of the column expression generates a unique alias with the specified maximum length.
Declaration
public string GetUniqueAlias(string alias, int aliasMaxLength)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The alias of the column expression for which a unique alias is generated. |
System.Int32 | aliasMaxLength | Maximum length of the unique alias. |
Returns
Type | Description |
---|---|
System.String | The unique alias for the column expression with the |