Class CastQueryFunction
Function of casting the argument expression to the specified data type.
Inherited Members
Namespace: Terrasoft.Core.DB
Assembly: Terrasoft.Core.dll
Syntax
public class CastQueryFunction : QueryFunction, IQueryColumnExpressionConvertible, IQueryColumnExpressionsCollector, ICloneable
Constructors
CastQueryFunction(CastQueryFunction)
Initializes a new CastQueryFunction instance that is a clone of the passed-in function.
Declaration
public CastQueryFunction(CastQueryFunction source)
Parameters
Type | Name | Description |
---|---|---|
CastQueryFunction | source | The CastQueryFunction function whose clone is being created. |
CastQueryFunction(IQueryColumnExpressionConvertible, DBDataValueType)
Initializes a new CastQueryFunction instance with the specified column expression and target data type.
Declaration
public CastQueryFunction(IQueryColumnExpressionConvertible expression, DBDataValueType castType)
Parameters
Type | Name | Description |
---|---|---|
IQueryColumnExpressionConvertible | expression | The column expression. |
DBDataValueType | castType | The target data type. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
CastQueryFunction(QueryColumnExpression, DBDataValueType)
Initializes a new CastQueryFunction instance with the specified column expression and target data type.
Declaration
public CastQueryFunction(QueryColumnExpression expression, DBDataValueType castType)
Parameters
Type | Name | Description |
---|---|---|
QueryColumnExpression | expression | The column expression. |
DBDataValueType | castType | The target data type. |
Properties
CastType
The target data type.
Declaration
public DBDataValueType CastType { get; set; }
Property Value
Type | Description |
---|---|
DBDataValueType |
Expression
The expression of the function argument.
Declaration
public QueryColumnExpression Expression { get; set; }
Property Value
Type | Description |
---|---|
QueryColumnExpression |
Methods
AddQueryColumnExpressions(QueryColumnExpressionCollection)
Declaration
protected override void AddQueryColumnExpressions(QueryColumnExpressionCollection collection)
Parameters
Type | Name | Description |
---|---|---|
QueryColumnExpressionCollection | collection |
Overrides
AddUsingParameters(QueryParameterCollection)
In the function arguments adds the passed-in collection of parameters.
Declaration
public override void AddUsingParameters(QueryParameterCollection resultParameters)
Parameters
Type | Name | Description |
---|---|---|
QueryParameterCollection | resultParameters | Collection of the query parameters. |
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
Clone()
Creates the clone of the current CastQueryFunction instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | A new CastQueryFunction instance that is a clone of the current instance. |