Creatio development guide
PDF
This documentation is valid for Creatio version 7.16.0. We recommend using the newest version of Creatio documentation.

The QueryFunction class

Glossary Item Box

Introduction

The Terrasoft.Core.DB.QueryFunction class implements the expression function.

The expression function is implemented in the following classes:

  • QueryFunction – a base class of the expression function.
  • AggregationQueryFunction – implements the aggregate function of the expression.
  • IsNullQueryFunction – replaces null values with the replacement experession.
  • CreateGuidQueryFunction – implements the function for generating a new identifier.
  • CurrentDateTimeQueryFunction – implements the function for current date and time expression.
  • CoalesceQueryFunction – returns the first not null expression from the list of arguments.
  • DatePartQueryFunction – implements the function for the date part of the Date/Time type.
  • DateAddQueryFunction – implements the function for the date expression calculated by adding the specified period to the specified date.
  • DateDiffQueryFunction – implements the function for calculating the delta between two specified dates.
  • CastQueryFunction – casts the argument expression to the specified data type.
  • UpperQueryFunction – converts the argument expression characters to uppercase.
  • CustomQueryFunction – implements a custom function.
  • DataLengthQueryFunction – calculates the number of bytes used to represent the expression.
  • TrimQueryFunction – removes whitespaces from both ends of the expression.
  • LengthQueryFunction – returns the length of the expression.
  • SubstringQueryFunction – returns a part of the string.
  • ConcatQueryFunction – returns a string resulting from merging the string arguments of the function.
  • WindowQueryFunction – implements an SQL window function.

The “Terrasoft.Core.DB.QueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, parent classes, and implemented interfaces of the QueryFunction class.

Methods

Table 1. Primary methods of the QueryFunction class

static QueryColumnExpression Negate(QueryFunction operand)

Gets the expression that negates the value of the passed-in function.

Parameters:

  • operand – the function of the expression.

static QueryColumnExpression operator -(QueryFunction operand)

Overloads the operator of negating the passed-in expression function.

Parameters:

  • operand – the function of the expression.

static QueryColumnExpression Add(QueryFunction leftOperand, QueryFunction rightOperand)

Gets the arithmetic addition expression of the passed-in expression functions.

Parameters:

  • leftOperand – the left operand in the addition operation;
  • rightOperand – the right operand in the addition operation.

static QueryColumnExpression operator /(QueryFunction leftOperand, QueryFunction rightOperand)

Overloads the operator of adding two expression functions.

Parameters:

  • leftOperand – the left operand in the addition operation;
  • rightOperand – the right operand in the addition operation.

static QueryColumnExpression Subtract(QueryFunction leftOperand, QueryFunction rightOperand)

Returns the expression of subtraction of the passed-in right expression function from the passed-in left expression function.

Parameters:

  • leftOperand – the left operand in the subtraction operation;
  • rightOperand – the right operand in the subtraction operation.

static QueryColumnExpression operator /(QueryFunction leftOperand, QueryFunction rightOperand)

Reloads the operator of subtraction of the passed-in right expression function from the passed-in left expression function.

Parameters:

  • leftOperand – the left operand in the subtraction operation;
  • rightOperand – the right operand in the subtraction operation.

static QueryColumnExpression Multiply(QueryFunction leftOperand, QueryFunction rightOperand)

Gets the expression of multiplying the passed-in expression functions.

Parameters:

  • leftOperand – the left operand in the multiplication operation;
  • rightOperand – the right operand in the multiplication operation.

static QueryColumnExpression operator /(QueryFunction leftOperand, QueryFunction rightOperand)

Overloads the operator of multiplying two expression functions.

Parameters:

  • leftOperand – the left operand in the multiplication operation;
  • rightOperand – the right operand in the multiplication operation.

static QueryColumnExpression Divide(QueryFunction leftOperand, QueryFunction rightOperand)

Returns the expression of dividing the passed-in left expression function by the passed-in right expression function.

Parameters:

  • leftOperand – the left operand in the division operation;
  • rightOperand – the right operand in the division operation.

static QueryColumnExpression operator /(QueryFunction leftOperand, QueryFunction rightOperand)

Overloads the operator of dividing two expression functions.

Parameters:

  • leftOperand – the left operand in the division operation;
  • rightOperand – the right operand in the division operation.

abstract object Clone(())

Creates a copy of the current QueryFunction instance.


abstract void BuildSqlText(StringBuilder sb, DBEngine dbEngine)

Generates the query text, using the passed StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder

virtual void AddUsingParameters(QueryParameterCollection resultParameters)

Adds the passed-in collection of parameters in the function arguments.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

QueryColumnExpressionCollection GetQueryColumnExpressions(())

Gets the collection of the query column expression for the current query function.


QueryColumnExpression GetQueryColumnExpression(())

Gets the query column expression for the current query function.


The “Terrasoft.Core.DB.AggregationQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the AggregationQueryFunction class.

Constructors

AggregationQueryFunction(())

Initializes a new instance of the AggregationQueryFunction class.


AggregationQueryFunction(AggregationTypeStrict aggregationType, QueryColumnExpression expression)

Initializes a new AggregationQueryFunction instance with the specified type of the aggregate function for the specified column expression.

Parameters:

  • aggregationType – the type of aggregating function;
  • expression – the column expression to which the aggregate function is applied.

AggregationQueryFunction(AggregationTypeStrict aggregationType, IQueryColumnExpressionConvertible expression)

Initializes a new AggregationQueryFunction instance with the specified type of the aggregate function for the specified column expression.

Parameters:

  • aggregationType – the type of aggregating function;
  • expression – the column expression to which the aggregate function is applied.

AggregationQueryFunction((AggregationQueryFunction source))

Initializes a new AggregationQueryFunction instance that is a clone of the passed aggregate function of the expression.

Parameters:

  • source – the AggregationQueryFunction expression aggregate function whose clone is being created.

Properties

Table 2. Primary properties of the AggregationQueryFunction class

AggregationType
AggregationTypeStrict

The type of the aggregate function.


AggregationEvalType
AggregationEvalType

The scope of the aggregate function.


Expression
QueryColumnExpression

The expression of the function argument.


Methods

Table 3. Primary methods of the AggregationQueryFunction class

override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder

override void AddUsingParameters(QueryParameterCollection resultParameters)

Adds the passed-in collection of parameters in the function arguments.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current AggregationQueryFunction instance.


AggregationQueryFunction All(())

Sets the [To All Values] scope for the current aggregate function.


AggregationQueryFunction Distinct(())

Sets the [To Unique Values] scope for the current aggregate function.


The “Terrasoft.Core.DB.IsNullQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the IsNullQueryFunction class.

Constructors

IsNullQueryFunction(())

Initializes a new IsNullQueryFunction instance.


IsNullQueryFunction(QueryColumnExpression checkExpression, QueryColumnExpression replacementExpression)
IsNullQueryFunction(IQueryColumnExpressionConvertible checkExpression, IQueryColumnExpressionConvertible replacementExpression)

Initializes a new IsNullQueryFunction instance for the specified validated expression and substitute expression.

Parameters:

  • checkExpression – the expression to check the null value;
  • replacementExpression – the expression returned by the function if checkExpression is null.

IsNullQueryFunction((IsNullQueryFunction source))

Initializes a new IsNullQueryFunction instance that is a clone of the passed expression function.

Parameters:

  • source – the IsNullQueryFunction expression aggregate function whose clone is being created.

Properties

Table 4. Primary properties of the IsNullQueryFunction class

CheckExpression
QueryColumnExpression

Expression of the function argument to check the null value.


ReplacementExpression
QueryColumnExpression

Expression of the function argument that is returned if the check expression is equal to null.


Methods

Table 5. Primary methods of the IsNullQueryFunction class

override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

Adds the passed-in collection of parameters in the function arguments.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current IsNullQueryFunction instance.


The “Terrasoft.Core.DB.CreateGuidQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, parent classes, and implemented interfaces of the CreateGuidQueryFunction class.

Constructors

CreateGuidQueryFunction(())

Initializes a new CreateGuidQueryFunction instance.


CreateGuidQueryFunction((CreateGuidQueryFunction source))

Initializes a new CreateGuidQueryFunction instance. The instance is a clone of the passed function.

Parameters:

  • source – the CreateGuidQueryFunction whose clone is being created.

Methods

Table 6. Primary methods of the CreateGuidQueryFunction class

override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override object Clone(())

Clones the current CreateGuidQueryFunction instance.


The “Terrasoft.Core.DB.CurrentDateTimeQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, parent classes, and implemented interfaces of the CurrentDateTimeQueryFunction class.

Constructors

CurrentDateTimeQueryFunction(())

Initializes a new CurrentDateTimeQueryFunction instance.


CurrentDateTimeQueryFunction((CurrentDateTimeQueryFunction source))

Initializes a new CurrentDateTimeQueryFunction instance. The instance is a clone of the passed function.

Parameters:

  • source – the CurrentDateTimeQueryFunction whose clone is being created.

Methods

Table 7. Primary methods of the CurrentDateTimeQueryFunction class

override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override object Clone(())

Creates a clone of the current CurrentDateTimeQueryFunction instance.


The “Terrasoft.Core.DB.CoalesceQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the CoalesceQueryFunction class.

Constructors

CoalesceQueryFunction(())

Initializes a new CoalesceQueryFunction instance.


CoalesceQueryFunction((CoalesceQueryFunction source))

Initializes a new CoalesceQueryFunction instance. The instance is a clone of the passed function.

Parameters:

  • source – the CoalesceQueryFunction whose clone is being created.

CoalesceQueryFunction((QueryColumnExpressionCollection expressions))

Initializes a new CoalesceQueryFunction instance for the passed collection of column expressions.

Parameters:

  • expressions – a collection of query column expressions.

CoalesceQueryFunction((QueryColumnExpression[] expressions))
CoalesceQueryFunction((IQueryColumnExpressionConvertible[] expressions))

Initializes a new CoalesceQueryFunction instance for the passed array of column expressions.

Parameters:

  • expressions – an array of expressions of query columns.

Properties

Table 8. Primary properties of the CoalesceQueryFunction class

Expressions
QueryColumnExpressionCollection

Collection of expressions of function arguments.


Methods

Table 9. Primary methods of the CoalesceQueryFunction class

override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override object Clone(())

Creates a clone of the current CoalesceQueryFunction instance.


override void AddUsingParameters(QueryParameterCollection resultParameters)

Adds specified parameters to a collection.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

The “Terrasoft.Core.DB.DatePartQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the DatePartQueryFunction class.

Constructors

DatePartQueryFunction(())

Initializes a new instance of the DatePartQueryFunction class.


DatePartQueryFunction(DatePartQueryFunctionInterval interval, QueryColumnExpression expression)
DatePartQueryFunction(DatePartQueryFunctionInterval interval, IQueryColumnExpressionConvertible expression)

Initializes a new DatePartQueryFunction instance with the specified expression of the column of the Date/Time type and the specified date part.

Parameters:

  • interval – the date part;
  • expression – the expression of the column of the Date/Time type.

DatePartQueryFunction((DatePartQueryFunction source))

Initializes a new DatePartQueryFunction instance that is a clone of the passed function.

Parameters:

  • source – the DatePartQueryFunction whose clone is being created.

Properties

Table 10. Primary properties of the DatePartQueryFunction class

Expression
QueryColumnExpression

The expression of the function argument.


Interval
DatePartQueryFunctionInterval

The date part returned by the function.


UseUtcOffset
bool

Using the coordinated universal time (UTC) offset from the specified local time.


UtcOffset
int?

Using the coordinated universal time (UTC).


Methods

Table 11. Primary methods of the DatePartQueryFunction class

override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

Adds specified parameters to a collection.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current DatePartQueryFunction instance.


The “Terrasoft.Core.DB.DateAddQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the DatePartQueryFunction class.

Constructors

DateAddQueryFunction(())

Initializes a new instance of the DateAddQueryFunction class.


DateAddQueryFunction(DatePartQueryFunctionInterval interval, int number, QueryColumnExpression expression)
DateAddQueryFunction(DatePartQueryFunctionInterval interval, IQueryColumnExpressionConvertible numberExpression, IQueryColumnExpressionConvertible expression)
DateAddQueryFunction(DatePartQueryFunctionInterval interval, int number, IQueryColumnExpressionConvertible expression)

Initializes the DateAddQueryFunction instance with the specified parameters.

Parameters:

  • interval – the date part to which the time span is added;
  • number – the value added to interval;
  • expression – the expression of the column with the original date.

DateAddQueryFunction((DateAddQueryFunction source))

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

Parameters:

  • source – an instance of the CoalesceQueryFunction whose clone is being created.

Properties

Table 12. Primary properties of the DateAddQueryFunction class

Expression
QueryColumnExpression

Expression of the column containing the original date.


Interval
DatePartQueryFunctionInterval

Datepart to which the time span is added.


Number
int

The time span to add.


NumberExpression
QueryColumnExpression

Expression containing the time period to be added.


Methods

Table 13. Primary methods of the DateAddQueryFunction class

override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

Adds specified parameters to a collection.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current DateAddQueryFunction instance.


The “Terrasoft.Core.DB.DateDiffQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the DatePartQueryFunction class.

Constructors

DateDiffQueryFunction(DateDiffQueryFunctionInterval interval, QueryColumnExpression startDateExpression, QueryColumnExpression endDateExpression)
DateDiffQueryFunction(DateDiffQueryFunctionInterval interval, IQueryColumnExpressionConvertible startDateExpression, IQueryColumnExpressionConvertible endDateExpression)

Initializes the DateDiffQueryFunction instance with the specified parameters.

Parameters:

  • interval – the unit for measuring the date difference;
  • startDateExpression – an expression of the column with the start date;
  • endDateExpression – an expression of the column with the end date.

DateDiffQueryFunction((DateDiffQueryFunction source))

Initializes the DateDiffQueryFunction instance that is a clone of the passed function.

Parameters:

  • source – an instance of the CoalesceQueryFunction whose clone is being created.

Properties

Table 14. Primary properties of the DateDiffQueryFunction class

StartDateExpression
QueryColumnExpression

An expression of the column containing the start date.


EndDateExpression
QueryColumnExpression

An expression of the column containing the end date.


Interval
DateDiffQueryFunctionInterval

Unit of measurement of the date difference returned by function.


Methods

Table 15. Primary methods of the DateDiffQueryFunction class

override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

Adds specified parameters to a collection.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current DateDiffQueryFunction instance.


The “Terrasoft.Core.DB.CastQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the CastQueryFunction class.

Constructors

CastQueryFunction(QueryColumnExpression expression, DBDataValueType castType)
CastQueryFunction(IQueryColumnExpressionConvertible expression, DBDataValueType castType)

Initializes a new CastQueryFunction instance with the specified column expression and target data type.

Parameters:

  • expression – a query column expression;
  • castType – the target data type.

CastQueryFunction((CastQueryFunction source))

Initializes a new CastQueryFunction instance that is a clone of the passed function.

Parameters:

  • source – the CastQueryFunction whose clone is being created.

Properties

Table 16. Primary properties of the CastQueryFunction class

Expression
QueryColumnExpression

The expression of the function argument.


CastType
DBDataValueType

The target data type.


Methods

Table 17. Primary methods of the CastQueryFunction class

override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

Adds specified parameters to a collection.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current CastQueryFunction instance.


The “Terrasoft.Core.DB.UpperQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the UpperQueryFunction class.

Constructors

UpperQueryFunction(())

Initializes a new instance of the UpperQueryFunction class.


UpperQueryFunction((QueryColumnExpression expression))
UpperQueryFunction((IQueryColumnExpressionConvertible expression))

Initializes a new UpperQueryFunction instance for the specified column expression.

Parameters:

  • expression – a query column expression.

UpperQueryFunction((UpperQueryFunction source))

Initializes a new UpperQueryFunction instance that is a clone of the passed function.

Parameters:

  • source – the UpperQueryFunction whose clone is being created.

Properties

Table 18. Primary properties of the UpperQueryFunction class

Expression
QueryColumnExpression

The expression of the function argument.


Methods

Table 19. Primary methods of the UpperQueryFunction class

override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

Adds specified parameters to a collection.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current UpperQueryFunction instance.


The “Terrasoft.Core.DB.CustomQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the CastQueryFunction class.

Constructors

CustomQueryFunction(())

Initializes a new instance of the CustomQueryFunction class.


CustomQueryFunction((string functionName, QueryColumnExpressionCollection expressions))

Initializes a new CustomQueryFunction instance for the specified function and passed collection of column expressions.

Parameters:

  • functionName – the function name;
  • expressions – a collection of query column expressions.

CustomQueryFunction((string functionName, QueryColumnExpression[] expressions))
CustomQueryFunction((string functionName, IQueryColumnExpressionConvertible[] expressions))

Initializes a new CustomQueryFunction instance for the specified function and passed array of column expressions.

Parameters:

  • functionName – the function name;
  • expressions – an array of expressions of query columns.

CustomQueryFunction((CustomQueryFunction source))

Initializes a new CustomQueryFunction instance that is a clone of the passed function.

Parameters:

  • source – the CustomQueryFunction whose clone is being created.

Properties

Table 20. Primary properties of the CustomQueryFunction class

Expressions
QueryColumnExpressionCollection

Collection of expressions of function arguments.


FunctionName
string

The name of the function.


Methods

Table 21. Primary methods of the CustomQueryFunction class

override void BuildSqlText((StringBuilder sb, DBEngine dbEngine))

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

Adds specified parameters to a collection.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current CustomQueryFunction instance.


The “Terrasoft.Core.DB.DataLengthQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the DataLengthQueryFunction class.

Constructors

DataLengthQueryFunction(())

Initializes a new instance of the DataLengthQueryFunction class.


DataLengthQueryFunction((QueryColumnExpression expression))

Initializes a new DataLengthQueryFunction instance for the specified column expression.

Parameters:

  • expression – a query column expression.

DataLengthQueryFunction((IQueryColumnExpressionConvertible columnNameExpression))

Initializes a new DataLengthQueryFunction instance for the specified column expression.

Parameters:

  • columnNameExpression – a query column expression.

DataLengthQueryFunction((DataLengthQueryFunction source))

Initializes a new DataLengthQueryFunction instance that is a clone of the passed function.

Parameters:

  • source – the DataLengthQueryFunction whose clone is being created.

Properties

Table 22. Primary properties of the DataLengthQueryFunction class

Expression
QueryColumnExpression

The expression of the function argument.


Methods

Table 23. Primary methods of the DataLengthQueryFunction class

override void BuildSqlText((StringBuilder sb, DBEngine dbEngine))

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

In the function arguments adds the passed-in collection of parameters.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current DataLengthQueryFunction instance.


The “Terrasoft.Core.DB.TrimQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the CastQueryFunction class.

Constructors

TrimQueryFunction((QueryColumnExpression expression))
TrimQueryFunction((IQueryColumnExpressionConvertible expression))

Initializes a new TrimQueryFunction instance for the specified column expression.

Parameters:

  • expression – a query column expression.

TrimQueryFunction((TrimQueryFunction source))

Initializes a new TrimQueryFunction instance that is a clone of the passed function.

Parameters:

  • source – the TrimQueryFunction whose clone is being created.

Properties

Table 24. Primary properties of the TrimQueryFunction class

Expression
QueryColumnExpression

The expression of the function argument.


Methods

Table 25. Primary methods of the TrimQueryFunction class

override void BuildSqlText((StringBuilder sb, DBEngine dbEngine))

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

In the function arguments adds the passed-in collection of parameters.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current TrimQueryFunction instance.


The “Terrasoft.Core.DB.LengthQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the DataLengthQueryFunction class.

Constructors

LengthQueryFunction(())

Initializes a new instance of the LengthQueryFunction class.


LengthQueryFunction((QueryColumnExpression expression))
LengthQueryFunction((IQueryColumnExpressionConvertible expression))

Initializes a new LengthQueryFunction instance for the specified column expression.

Parameters:

  • expression – a query column expression.

LengthQueryFunction((LengthQueryFunction source))

Initializes a new LengthQueryFunction instance that is a clone of the passed function.

Parameters:

  • source – the LengthQueryFunction whose clone is being created.

Properties

Table 26. Primary properties of the LengthQueryFunction class

Expression
QueryColumnExpression

The expression of the function argument.


Methods

Table 27. Primary methods of the LengthQueryFunction class

override void BuildSqlText((StringBuilder sb, DBEngine dbEngine))

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

In the function arguments adds the passed-in collection of parameters.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current LengthQueryFunction instance.


The “Terrasoft.Core.DB.SubstringQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the SubstringQueryFunction class.

Constructors

SubstringQueryFunction((QueryColumnExpression expression, int start, int length))
SubstringQueryFunction((IQueryColumnExpressionConvertible expression, int start, int length))

Initializes a new SubstringQueryFunction instance for the specified column expression, starting position and the length of the substring.

Parameters:

  • expression – a query column expression;
  • start – the start index of the substring;
  • length – the length of the substring.

SubstringQueryFunction((SubstringQueryFunction source))

Initializes a new SubstringQueryFunction instance that is a clone of the passed function.

Parameters:

  • source – the SubstringQueryFunction whose clone is being created.

Properties

Table 28. Primary properties of the SubstringQueryFunction class

Expression
QueryColumnExpression

The expression of the function argument.


StartExpression
QueryColumnExpression

The start index of the substring.


LengthExpression
QueryColumnExpression

The length of the substring.


Methods

Table 29. Primary methods of the SubstringQueryFunction class

override void BuildSqlText((StringBuilder sb, DBEngine dbEngine))

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

In the function arguments adds the passed-in collection of parameters.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current SubstringQueryFunction instance.


The “Terrasoft.Core.DB.ConcatQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the ConcatQueryFunction class.

Constructors

ConcatQueryFunction((QueryColumnExpressionCollection expressions))

Initializes a new ConcatQueryFunction instance for the passed expression collection.

Parameters:

  • expressions – a collection of query column expressions.

ConcatQueryFunction((ConcatQueryFunction source))

Initializes a new ConcatQueryFunction instance that is a clone of the passed function.

Parameters:

  • source – the ConcatQueryFunction whose clone is being created.

Properties

Table 30. Primary properties of the ConcatQueryFunction class

Expressions
QueryColumnExpressionCollection

Collection of expressions of function arguments.


Methods

Table 31. Primary methods of the ConcatQueryFunction class

override void BuildSqlText((StringBuilder sb, DBEngine dbEngine))

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

In the function arguments adds the passed-in collection of parameters.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current ConcatQueryFunction instance.


The “Terrasoft.Core.DB.WindowQueryFunction” class

Use the “.NET class libraries of platform core” documentation to access the full list of the methods, properties, parent classes, and implemented interfaces of the WindowQueryFunction class.

Constructors

WindowQueryFunction((QueryFunction innerFunction))

Implements an SQL window function.

Parameters:

  • innerFunction – nested function.

WindowQueryFunction((QueryFunction innerFunction, QueryColumnExpression partitionByExpression = null, QueryColumnExpression orderByExpression = null) : this(innerFunction))

Implements an SQL window function.

Parameters:

  • innerFunction – nested function;
  • partitionByExpression – expression for separating the query;
  • orderByExpression – expression for sorting the query.

WindowQueryFunction((WindowQueryFunction source) : this( source.InnerFunction, source.PartitionByExpression, source.OrderByExpression))

Initializes a new WindowQueryFunction instance that is a clone of the passed function.

Parameters:

  • source – the WindowQueryFunction whose clone is being created.

Properties

Table 32. Primary properties of the WindowQueryFunction class

InnerFunction
QueryFunction

The function to apply.


PartitionByExpression
QueryColumnExpression

Split by expression.


OrderByExpression
QueryColumnExpression

Sort by expression.


Methods

Table 33. Primary methods of the WindowQueryFunction class

override void BuildSqlText((StringBuilder sb, DBEngine dbEngine))

Generates the query text, using the specified StringBuilder instance and the DBEngine query builder.

Parameters:

  • sbStringBuilder instance used to create query text;
  • dbEngine – the instance of the database query builder.

override void AddUsingParameters(QueryParameterCollection resultParameters)

In the function arguments adds the passed-in collection of parameters.

Parameters:

  • resultParameters – the collection of query parameters that are added in the function arguments.

override object Clone(())

Creates a clone of the current WindowQueryFunction instance.


© Creatio 2002-2020.

Did you find this information useful?

How can we improve it?