Show / Hide Table of Contents

Class DateAddQueryFunction

Function of the expression of the date yielded by adding the specified time span to the specified date.

Inheritance
System.Object
QueryFunction
DateAddQueryFunction
Implements
IQueryColumnExpressionConvertible
IQueryColumnExpressionsCollector
System.ICloneable
Inherited Members
QueryFunction.Negate(QueryFunction)
QueryFunction.Add(QueryFunction, QueryFunction)
QueryFunction.Subtract(QueryFunction, QueryFunction)
QueryFunction.Multiply(QueryFunction, QueryFunction)
QueryFunction.Divide(QueryFunction, QueryFunction)
QueryFunction.GetQueryColumnExpressions()
QueryFunction.GetQueryColumnExpression()
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Terrasoft.Core.DB
Assembly: Terrasoft.Core.dll
Syntax
public class DateAddQueryFunction : QueryFunction, IQueryColumnExpressionConvertible, IQueryColumnExpressionsCollector, ICloneable

Constructors

DateAddQueryFunction()

Initializes the DateAddQueryFunction instance.

Declaration
public DateAddQueryFunction()

DateAddQueryFunction(DateAddQueryFunction)

Initializes the DateAddQueryFunction instance that is a clone of the passed-in function.

Declaration
public DateAddQueryFunction(DateAddQueryFunction source)
Parameters
Type Name Description
DateAddQueryFunction source

The instance of the DateAddQueryFunction function whose clone is being created.

DateAddQueryFunction(DatePartQueryFunctionInterval, Int32, IQueryColumnExpressionConvertible)

Initializes the DateAddQueryFunction instance with the specified parameters.

Declaration
public DateAddQueryFunction(DatePartQueryFunctionInterval interval, int number, IQueryColumnExpressionConvertible expression)
Parameters
Type Name Description
DatePartQueryFunctionInterval interval

Datepart to which the time span is added.

System.Int32 number

Value that is being added to interval.

IQueryColumnExpressionConvertible expression

Expression of the column containing the original date.

Exceptions
Type Condition
System.ArgumentNullException

If the null value is passed as the parameter.

DateAddQueryFunction(DatePartQueryFunctionInterval, Int32, QueryColumnExpression)

Initializes the DateAddQueryFunction instance with the specified parameters.

Declaration
public DateAddQueryFunction(DatePartQueryFunctionInterval interval, int number, QueryColumnExpression expression)
Parameters
Type Name Description
DatePartQueryFunctionInterval interval

Datepart to which the time span is added.

System.Int32 number

Value that is being added to interval.

QueryColumnExpression expression

Expression of the column containing the original date.

DateAddQueryFunction(DatePartQueryFunctionInterval, IQueryColumnExpressionConvertible, IQueryColumnExpressionConvertible)

Initializes the DateAddQueryFunction instance with the specified parameters.

Declaration
public DateAddQueryFunction(DatePartQueryFunctionInterval interval, IQueryColumnExpressionConvertible numberExpression, IQueryColumnExpressionConvertible expression)
Parameters
Type Name Description
DatePartQueryFunctionInterval interval

Datepart to which the time span is added.

IQueryColumnExpressionConvertible numberExpression

Value that is being added to interval.

IQueryColumnExpressionConvertible expression

Expression of the column containing the original date.

Properties

Expression

Expression of the column containing the original date.

Declaration
public QueryColumnExpression Expression { get; set; }
Property Value
Type Description
QueryColumnExpression

Interval

Datepart to which the time span is added.

Declaration
public DatePartQueryFunctionInterval Interval { get; set; }
Property Value
Type Description
DatePartQueryFunctionInterval

Number

Declaration
[Obsolete("7.15.1 | Property is not in use and will be removed in upcoming releases. Use NumberExpression instead.")]
public int Number { get; set; }
Property Value
Type Description
System.Int32

NumberExpression

Expression containing the time period to be added.

Declaration
public QueryColumnExpression NumberExpression { get; set; }
Property Value
Type Description
QueryColumnExpression

Methods

AddQueryColumnExpressions(QueryColumnExpressionCollection)

Declaration
protected override void AddQueryColumnExpressions(QueryColumnExpressionCollection collection)
Parameters
Type Name Description
QueryColumnExpressionCollection collection
Overrides
QueryFunction.AddQueryColumnExpressions(QueryColumnExpressionCollection)

AddUsingParameters(QueryParameterCollection)

Adds the passed parameter collection to the function arguments.

Declaration
public override void AddUsingParameters(QueryParameterCollection resultParameters)
Parameters
Type Name Description
QueryParameterCollection resultParameters

A collection of query parameters.

Overrides
QueryFunction.AddUsingParameters(QueryParameterCollection)

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
QueryFunction.BuildSqlText(StringBuilder, DBEngine)

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.

Overrides
QueryFunction.Clone()

Implements

IQueryColumnExpressionConvertible
IQueryColumnExpressionsCollector
System.ICloneable

Extension Methods

ReflectionUtilities.GetPropertyValue(Object, String)
ReflectionUtilities.GetPropertyDefValue(Object, String, Object)
ReflectionUtilities.TryGetPropertyValue(Object, String, out Object)
ReflectionUtilities.HasProperty(Object, String)
ReflectionUtilities.GetPropertyValue(Object, String, BindingFlags)
ReflectionUtilities.GetPropertyValueByPath(Object, String)
ReflectionUtilities.SetPropertyValue(Object, String, Object)
ReflectionUtilities.TrySetPropertyValue(Object, String, Object)
ValidateUtilities.CheckArgumentNull(Object, String)
ValidateUtilities.CheckDependencyNull(Object, String)
ValidateUtilities.EnsureDependencyNotNull<T>(T, String)
MetaDataTestUtils.MetaPropertiesShouldNotHaveDefValue<TInstance>(TInstance)
MetaDataTestUtils.MetaPropertiesShouldNotHaveDefValue<TInstance>(TInstance, Boolean)
NSubstituteExtension.Protected(Object, String, Object[])
NSubstituteExtension.Protected(Object, String, Boolean, Object[])
NSubstituteExtension.ProtectedGeneric<T>(Object, String, Object[])
NSubstituteExtension.ProtectedGeneric<T>(Object, String, Boolean, Object[])
NSubstituteExtension.ProtectedProperty(Object, String)
NSubstituteExtension.MatchInstance<T>(T)
SubstituteUtilities.GetIsSubstituteObject(Object)
SubstituteUtilities.Instead<TInstance, TValue>(TInstance, Func<TInstance, TValue>)
Back to top Generated by DocFX