Class CoalesceQueryFunction
Function that returns the first expression that is not equal to null
from the list of arguments.
Inherited Members
Namespace: Terrasoft.Core.DB
Assembly: Terrasoft.Core.dll
Syntax
public class CoalesceQueryFunction : QueryFunction, IQueryColumnExpressionConvertible, IQueryColumnExpressionsCollector, ICloneable
Constructors
CoalesceQueryFunction()
Initializes a new CoalesceQueryFunction instance.
Declaration
public CoalesceQueryFunction()
CoalesceQueryFunction(CoalesceQueryFunction)
Initializes a new CoalesceQueryFunction instance that is a clone of the passed-in function.
Declaration
public CoalesceQueryFunction(CoalesceQueryFunction source)
Parameters
Type | Name | Description |
---|---|---|
CoalesceQueryFunction | source | The CoalesceQueryFunction function whose clone is being created. |
CoalesceQueryFunction(IQueryColumnExpressionConvertible[])
Initializes a new CoalesceQueryFunction instance for the passed-in array of column expressions.
Declaration
public CoalesceQueryFunction(IQueryColumnExpressionConvertible[] expressions)
Parameters
Type | Name | Description |
---|---|---|
IQueryColumnExpressionConvertible[] | expressions | Array of column expressions. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
ArgumentEmptyException | If the |
CoalesceQueryFunction(QueryColumnExpression[])
Initializes a new CoalesceQueryFunction instance for the passed-in array of column expressions.
Declaration
public CoalesceQueryFunction(QueryColumnExpression[] expressions)
Parameters
Type | Name | Description |
---|---|---|
QueryColumnExpression[] | expressions | Array of expressions of query columns. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
ArgumentEmptyException | If the |
CoalesceQueryFunction(QueryColumnExpressionCollection)
Initializes a new CoalesceQueryFunction instance for the passed-in collection of column expressions.
Declaration
public CoalesceQueryFunction(QueryColumnExpressionCollection expressions)
Parameters
Type | Name | Description |
---|---|---|
QueryColumnExpressionCollection | expressions | Collection of expressions of query columns. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
ArgumentEmptyException | If the |
Properties
Expressions
Collection of expressions of function arguments.
Declaration
public QueryColumnExpressionCollection Expressions { get; }
Property Value
Type | Description |
---|---|
QueryColumnExpressionCollection |
Methods
AddQueryColumnExpressions(QueryColumnExpressionCollection)
Declaration
protected override void AddQueryColumnExpressions(QueryColumnExpressionCollection collection)
Parameters
Type | Name | Description |
---|---|---|
QueryColumnExpressionCollection | collection |
Overrides
AddUsingParameters(QueryParameterCollection)
Declaration
public override void AddUsingParameters(QueryParameterCollection resultParameters)
Parameters
Type | Name | Description |
---|---|---|
QueryParameterCollection | resultParameters |
Overrides
BuildSqlText(StringBuilder, DBEngine)
Generates the query text, using the specified System.Text.StringBuilder instance and the DBEngine query builder.
Declaration
public override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Parameters
Type | Name | Description |
---|---|---|
System.Text.StringBuilder | sb | The System.Text.StringBuilder instance used to create query text. |
DBEngine | dbEngine | The instance of the builder of the database queries. |
Overrides
Exceptions
Type | Condition |
---|---|
InvalidObjectStateException | If the collection of function arguments does not contain any expressions. |
Clone()
Creates the clone of the current CoalesceQueryFunction instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | A new CoalesceQueryFunction instance that is a clone of the current instance. |