QueryFunction class
The Terrasoft.Core.DB.QueryFunction
class implements the expression function.
The following classes implement the expression function:
QueryFunction
. The base class of the expression function.AggregationQueryFunction
. Implements the aggregate expression function.IsNullQueryFunction
. Replacesnull
values with the replacing expression.CreateGuidQueryFunction
. Implements the expression function for a new ID.CurrentDateTimeQueryFunction
. Implements the expression function for the current date and time.CoalesceQueryFunction
. Returns the first non-null
expression from the argument list.DatePartQueryFunction
. Implements the expression function for a part of aDate/Time
type value.DateAddQueryFunction
. Implements the expression function for the date, calculated by adding the period to the date.DateDiffQueryFunction
. Implements the expression function for the difference between the dates, calculated by subtracting the 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 bytes used to represent the expression.TrimQueryFunction
. Removes whitespaces from both ends of the expression.LengthQueryFunction
. Returns the expression length.SubstringQueryFunction
. Retrieves a part of the string.ConcatQueryFunction
. Creates a string by merging the string arguments of the function.WindowQueryFunction
. Implements an SQL window function.
QueryFunction class
The Terrasoft.Core.DB
namespace.
The base class of the expression function.
View the entire list of methods of the QueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
Methods
static QueryColumnExpression Negate(QueryFunction operand)
Returns the expression that negates the value of the passed function.
Parameters
operand | The expression function. |
static QueryColumnExpression operator -(QueryFunction operand)
Overloads the operator that negates the passed expression function.
Parameters
operand | The expression function. |
static QueryColumnExpression Add(QueryFunction leftOperand, QueryFunction rightOperand)
Returns the expression that adds the passed 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 that adds 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 that subtracts the right expression function from the left 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)
Overloads the operator that subtracts the right expression function from the left 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)
Returns the expression that multiplies the passed 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 that multiplies 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 that divides the left expression function by the right 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 that divides the expression functions.
Parameters
leftOperand | The left operand in the division operation. |
rightOperand | The right operand in the division operation. |
abstract object Clone()
Makes a copy of the current QueryFunction
instance.
abstract void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the passed StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
virtual void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the passed collection of parameters to the function arguments.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
QueryColumnExpressionCollection GetQueryColumnExpressions()
Returns the collection of query column expressions for the current query function.
QueryColumnExpression GetQueryColumnExpression()
Returns the query column expression for the current query function.
AggregationQueryFunction class
Terrasoft.Core.DB
namespace.
The class implements the aggregate expression function.
View the entire list of methods and properties of the AggregationQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
Constructors
AggregationQueryFunction();
Initializes a new AggregationQueryFunction
instance.
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 aggregate function type. |
expression | The column expression to apply the aggregate function. |
AggregationQueryFunction(AggregationTypeStrict aggregationType, IQueryColumnExpressionConvertible expression)
Initializes a new AggregationQueryFunction
instance with the specified type of the aggregate function for the column expression.
Parameters
aggregationType | The aggregate function type. |
expression | The column expression to apply the aggregate function. |
AggregationQueryFunction(AggregationQueryFunction source)
Initializes a new AggregationQueryFunction
instance that is a clone of the passed aggregate expression function.
Parameters
source | The aggregate function of the |
Properties
AggregationType AggregationTypeStrict
The aggregate function type.
AggregationEvalType AggregationEvalType
The aggregate function scope.
Expression QueryColumnExpression
The function argument expression.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the passed collection of parameters to the function arguments.
Parameters
resultParameters | A collection of query parameters to add to 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.
IsNullQueryFunction class
Terrasoft.Core.DB
namespace.
The class replaces null
values with the replacing expression.
View the entire list of methods and properties of the IsNullQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
Constructors
IsNullQueryFunction();
Initializes a new IsNullQueryFunction
instance.
IsNullQueryFunction(QueryColumnExpression checkExpression, QueryColumnExpression replacementExpression)
IsNullQueryFunction(IQueryColumnExpressionConvertible checkExpression, IQueryColumnExpressionConvertible replacementExpression)
Initializes a new IsNullQueryFunction
instance for the check expression and the replacing expression.
Parameters
checkExpression | The expression to compare to |
replacementExpression | The expression the function returns if |
IsNullQueryFunction(IsNullQueryFunction source)
Initializes a new IsNullQueryFunction
instance that is a clone of the passed expression function.
Parameters
source | The aggregate function of the |
Properties
CheckExpression QueryColumnExpression
The function argument expression to compare to null
.
ReplacementExpression QueryColumnExpression
The function argument expression to return if the check expression is null
.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the passed collection of parameters to the function arguments.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current IsNullQueryFunction
instance
CreateGuidQueryFunction class
Terrasoft.Core.DB
namespace.
The class implements the expression function for a new ID.
View the entire list of methods of the CreateGuidQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
Constructors
CreateGuidQueryFunction();
Initializes a new CreateGuidQueryFunction
instance.
CreateGuidQueryFunction(CreateGuidQueryFunction source)
Initializes a new CreateGuidQueryFunction instance
that is a clone of the passed function.
Parameters
source | The |
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override object Clone()
Clones the current CreateGuidQueryFunction
instance.
CurrentDateTimeQueryFunction class
The Terrasoft.Core.DB
namespace.
The class implements the expression function for the current date and time.
View the entire list of methods of the CurrentDateTimeQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
Constructors
CurrentDateTimeQueryFunction();
Initializes a new CurrentDateTimeQueryFunction
instance.
CurrentDateTimeQueryFunction(CurrentDateTimeQueryFunction source)
Initializes a new CurrentDateTimeQueryFunction
instance that is a clone of the passed function.
Parameters
source | The |
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override object Clone()
Creates a clone of the current CurrentDateTimeQueryFunction
instance.
CoalesceQueryFunction class
Terrasoft.Core.DB
namespace.
The class returns the first non-null
expression from the argument list.
View the entire list of methods and properties of the CoalesceQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
Constructors
CoalesceQueryFunction();
Initializes a new CoalesceQueryFunction
instance.
CoalesceQueryFunction(CoalesceQueryFunction source)
Initializes a new CoalesceQueryFunction
instance that is a clone of the passed function.
Parameters
source | The |
CoalesceQueryFunction(QueryColumnExpressionCollection expressions)
Initializes a new CoalesceQueryFunction
instance for the passed collection of column expressions.
Parameters
expressions | The 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 | The array of query column expressions. |
Properties
Expressions QueryColumnExpressionCollection
The collection of function argument expressions.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
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 the specified parameters to the collection.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
DatePartQueryFunction class
Terrasoft.Core.DB
namespace.
The class implements the expression function for a part of a Date/Time
type value.
View the entire list of methods and properties of the DatePartQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
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 set expression of the Date/Time
type column and the specified date part.
Parameters
interval | The date part. |
expression | The expression of the |
DatePartQueryFunction(DatePartQueryFunction source)
Initializes a new DatePartQueryFunction
instance that is a clone of the passed function.
Parameters
source | The |
Properties
Expression QueryColumnExpression
The expression of the function argument.
Interval DatePartQueryFunctionInterval
The date part that the function returns.
UseUtcOffset bool
Whether to use the Universal Coordinated Time (UTC) offset relative to the set local time.
UtcOffset int?
The UTC offset.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the specified parameters to the collection.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current DatePartQueryFunction
instance.
DateAddQueryFunction class
Terrasoft.Core.DB
namespace.
The class implements the expression function for the date, calculated by adding the period to the date.
View the entire list of methods and properties of the DateAddQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
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 a DateAddQueryFunction
instance with the specified parameters.
Parameters
interval | The date part to add the period. |
number | The value to add to |
expression | The expression of the column that contains the original date. |
DateAddQueryFunction(DateAddQueryFunction source)
Initializes a DateAddQueryFunction
instance that is a clone of the passed function.
Parameters
source | The instance of the |
Properties
Expression QueryColumnExpression
The expression of the column that contains the original date.
Interval DatePartQueryFunctionInterval
The date part to add the period.
Number int
The period to add.
NumberExpression QueryColumnExpression
The expression that contains the period to add.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the specified parameters to the collection.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current DateAddQueryFunction
instance.
DateDiffQueryFunction class
Terrasoft.Core.DB
namespace.
The class implements the expression function for the difference between the dates, calculated by subtraction.
View the entire list of methods and properties of the DateDiffQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
Constructors
DateDiffQueryFunction(DateDiffQueryFunctionInterval interval, QueryColumnExpression startDateExpression, QueryColumnExpression endDateExpression)
DateDiffQueryFunction(DateDiffQueryFunctionInterval interval, IQueryColumnExpressionConvertible startDateExpression, IQueryColumnExpressionConvertible endDateExpression)
Initializes a DateDiffQueryFunction
instance with the specified parameters.
Parameters
interval | The date interval unit. |
startDateExpression | The expression of the column that contains the start date. |
endDateExpression | The expression of the column that contains the end date. |
DateDiffQueryFunction(DateDiffQueryFunction source)
Initializes a DateDiffQueryFunction
instance that is a clone of the passed function.
Parameters
source | The instance of the |
Properties
StartDateExpression QueryColumnExpression
The expression of the column that contains the start date.
EndDateExpression QueryColumnExpression
The expression of the column that contains the end date.
Interval DateDiffQueryFunctionInterval
The date difference’s measurement unit that the function returns.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the specified parameters to the collection.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current DateDiffQueryFunction
instance.
CastQueryFunction class
Terrasoft.Core.DB
namespace.
The class casts the argument expression to the specified data type.
View the entire list of methods and properties of the CastQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
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 | The 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 |
Properties
Expression QueryColumnExpression
The expression of the function argument.
CastType DBDataValueType
The target data type.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the specified parameters to the collection.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current CastQueryFunction
instance.
UpperQueryFunction class
Terrasoft.Core.DB
namespace.
The class converts the argument expression characters to uppercase.
View the entire list of methods and properties of the UpperQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
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 | The query column expression. |
UpperQueryFunction(UpperQueryFunction source)
Initializes a new UpperQueryFunction
instance that is a clone of the passed function.
Parameters
source | The |
Properties
Expression;
The expression of the function argument.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the specified parameters to the collection.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current UpperQueryFunction
instance.
CustomQueryFunction class
Terrasoft.Core.DB
namespace.
The class implements a custom function.
View the entire list of methods and properties of the CustomQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
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 name of the function. |
expressions | The 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 name of the function. |
expressions | The array of query column expressions. |
CustomQueryFunction(CustomQueryFunction source)
Initializes a new CustomQueryFunction
instance that is a clone of the passed function.
Parameters
source | The |
Properties
Expressions QueryColumnExpressionCollection
The collection of function argument expressions.
FunctionName string
The name of the function.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the specified parameters to the collection.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current CustomQueryFunction
instance.
DataLengthQueryFunction class
Terrasoft.Core.DB
namespace.
The class calculates bytes used to represent the expression.
View the entire list of methods and properties of the DataLengthQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
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 | The query column expression. |
DataLengthQueryFunction(IQueryColumnExpressionConvertible columnNameExpression)
Initializes a new DataLengthQueryFunction
instance for the specified column expression.
Parameters
columnNameExpression | The query column expression. |
DataLengthQueryFunction(DataLengthQueryFunction source)
Initializes a new DataLengthQueryFunction
instance that is a clone of the passed function.
Parameters
source | The |
Properties
Expression QueryColumnExpression
The function argument expression.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the passed collection of parameters to the function arguments.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current DataLengthQueryFunction
instance.
TrimQueryFunction class
Terrasoft.Core.DB
namespace.
The class removes whitespaces from both ends of the expression.
View the entire list of methods and properties of the TrimQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
Constructors
TrimQueryFunction(QueryColumnExpression expression)
TrimQueryFunction(IQueryColumnExpressionConvertible expression)
Initializes a new TrimQueryFunction
instance for the specified column expression.
Parameters
expression | The query column expression. |
TrimQueryFunction(TrimQueryFunction source)
Initializes a new TrimQueryFunction
instance that is a clone of the passed function.
Parameters
source | The |
Properties
Expression QueryColumnExpression
The expression of the function argument.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the passed collection of parameters to the function arguments.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current TrimQueryFunction
instance.
LengthQueryFunction class
Terrasoft.Core.DB
namespace.
The class returns the length of the expression.
View the entire list of methods and properties of the LengthQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
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 | The query column expression. |
LengthQueryFunction(LengthQueryFunction source)
Initializes a new LengthQueryFunction
instance that is a clone of the passed function.
Parameters
source | The |
Properties
Expression QueryColumnExpression
The function argument expression.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the passed collection of parameters to the function arguments.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current LengthQueryFunction
instance.
SubstringQueryFunction class
Terrasoft.Core.DB
namespace.
The class retrieves a part of the string.
View the entire list of methods and properties of the SubstringQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
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 substring length.
Parameters
expression | The query column expression. |
start | The starting position 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 |
Properties
Expression QueryColumnExpression
The expression of the function argument.
StartExpression QueryColumnExpression
The starting position of the substring.
LengthExpression QueryColumnExpression
The length of the substring.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the passed collection of parameters to the function arguments.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current SubstringQueryFunction
instance.
ConcatQueryFunction class
Terrasoft.Core.DB
namespace.
The class creates a string by merging the string arguments of the function.
View the entire list of methods and properties of the ConcatQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
Constructors
ConcatQueryFunction(QueryColumnExpressionCollection expressions)
Initializes a new ConcatQueryFunction
instance for the passed expression collection.
Parameters
expressions | The collection of query column expressions. |
ConcatQueryFunction(ConcatQueryFunction source)
Initializes a new ConcatQueryFunction
instance that is a clone of the passed function.
Parameters
source | The |
Properties
Expressions QueryColumnExpressionCollection
The collection of function argument expressions.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the passed collection of parameters to the function arguments.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current ConcatQueryFunction
instance.
WindowQueryFunction class
The Terrasoft.Core.DB
namespace.
The class implements an SQL window function.
View the entire list of methods and properties of the WindowQueryFunction
class, its parent classes, as well as the interfaces it implements, in the .NET class library documentation.
Constructors
WindowQueryFunction(QueryFunction innerFunction)
Implements an SQL window function.
Parameters
innerFunction | The nested function. |
WindowQueryFunction(QueryFunction innerFunction, QueryColumnExpression partitionByExpression = null, QueryColumnExpression orderByExpression = null) : this(innerFunction)
Implements an SQL window function.
Parameters
innerFunction | The nested function. |
partitionByExpression | The expression that separates the query. |
orderByExpression | The expression that sorts 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 |
Properties
InnerFunction QueryFunction
The function to apply.
PartitionByExpression QueryColumnExpression
Partition by items.
OrderByExpression QueryColumnExpression
Sorts by items.
Methods
override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Generates the query string using the specified StringBuilder
instance and the DBEngine
query builder.
Parameters
sb | The |
dbEngine | The instance of the database query builder. |
override void AddUsingParameters(QueryParameterCollection resultParameters)
Adds the passed collection of parameters to the function arguments.
Parameters
resultParameters | A collection of query parameters to add to the function arguments. |
override object Clone()
Creates a clone of the current WindowQueryFunction
instance.