Class DatePartQueryFunction
The expression function for the datepart of the Date/Time type.
Inherited Members
Namespace: Terrasoft.Core.DB
Assembly: Terrasoft.Core.dll
Syntax
public class DatePartQueryFunction : QueryFunction, IQueryColumnExpressionConvertible, IQueryColumnExpressionsCollector, ICloneable
Constructors
DatePartQueryFunction()
Initializes a new DatePartQueryFunction instance.
Declaration
public DatePartQueryFunction()
DatePartQueryFunction(DatePartQueryFunction)
Initializes a new DatePartQueryFunction instance that is a clone of the passed-in function.
Declaration
public DatePartQueryFunction(DatePartQueryFunction source)
Parameters
Type | Name | Description |
---|---|---|
DatePartQueryFunction | source | The DatePartQueryFunction function whose clone is being created. |
DatePartQueryFunction(DatePartQueryFunctionInterval, IQueryColumnExpressionConvertible)
Initializes a new DatePartQueryFunction instance with the specified expression of the column of the Date/Time type and the specified datepart.
Declaration
public DatePartQueryFunction(DatePartQueryFunctionInterval interval, IQueryColumnExpressionConvertible expression)
Parameters
Type | Name | Description |
---|---|---|
DatePartQueryFunctionInterval | interval | Datepart. |
IQueryColumnExpressionConvertible | expression | The expression of the column of the Date/Time type. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
DatePartQueryFunction(DatePartQueryFunctionInterval, QueryColumnExpression)
Initializes a new DatePartQueryFunction instance with the specified expression of the column of the Date/Time type and the specified datepart.
Declaration
public DatePartQueryFunction(DatePartQueryFunctionInterval interval, QueryColumnExpression expression)
Parameters
Type | Name | Description |
---|---|---|
DatePartQueryFunctionInterval | interval | Datepart. |
QueryColumnExpression | expression | The expression of the column of the Date/Time type. |
Properties
Expression
The expression of the function argument.
Declaration
public QueryColumnExpression Expression { get; set; }
Property Value
Type | Description |
---|---|
QueryColumnExpression |
Interval
The datepart returned by the function.
Declaration
public DatePartQueryFunctionInterval Interval { get; set; }
Property Value
Type | Description |
---|---|
DatePartQueryFunctionInterval |
UseUtcOffset
Declaration
public bool UseUtcOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
UtcOffset
Declaration
public int? UtcOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
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 DatePartQueryFunction instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | A new DatePartQueryFunction instance that is a clone of the current instance. |