Class QueryFunction
Base class of the expression function.
Inheritance
Inherited Members
Namespace: Terrasoft.Core.DB
Assembly: Terrasoft.Core.dll
Syntax
public abstract class QueryFunction : IQueryColumnExpressionConvertible, IQueryColumnExpressionsCollector, ICloneable
Constructors
QueryFunction()
Declaration
protected QueryFunction()
Methods
Add(QueryFunction, QueryFunction)
Gets the arithmetic addition expression of the passed-in expression functions.
Declaration
public static QueryColumnExpression Add(QueryFunction leftOperand, QueryFunction rightOperand)
Parameters
Type | Name | Description |
---|---|---|
QueryFunction | leftOperand | The expression function – left operand in the addition operation. |
QueryFunction | rightOperand | The expression function – right operand in the addition operation. |
Returns
Type | Description |
---|---|
QueryColumnExpression | The QueryColumnExpression instance that represents the sum of the |
AddQueryColumnExpressions(QueryColumnExpressionCollection)
Declaration
protected abstract void AddQueryColumnExpressions(QueryColumnExpressionCollection collection)
Parameters
Type | Name | Description |
---|---|---|
QueryColumnExpressionCollection | collection |
AddUsingParameters(QueryParameterCollection)
Adds the passed-in collection of parameters in the function arguments.
Declaration
public virtual void AddUsingParameters(QueryParameterCollection resultParameters)
Parameters
Type | Name | Description |
---|---|---|
QueryParameterCollection | resultParameters | Collection of query parameters that are added in the function arguments. |
BuildSqlText(StringBuilder, DBEngine)
Generates the query text, using the passed-in System.Text.StringBuilder instance and the DBEngine query builder.
Declaration
public abstract 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. |
Clone()
Creates a copy of the current QueryFunction instance.
Declaration
public abstract object Clone()
Returns
Type | Description |
---|---|
System.Object | A new QueryFunction instance that represents the copy of the current instance. |
Divide(QueryFunction, QueryFunction)
Gets the expression of dividing the passed-in left expression function by the passed-in right expression function.
Declaration
public static QueryColumnExpression Divide(QueryFunction leftOperand, QueryFunction rightOperand)
Parameters
Type | Name | Description |
---|---|---|
QueryFunction | leftOperand | The expression function – left operand in the division operation. |
QueryFunction | rightOperand | The expression function – right operand in the division operation. |
Returns
Type | Description |
---|---|
QueryColumnExpression | The QueryColumnExpression instance that represents the quotient of the |
GetQueryColumnExpression()
Gets the query column expression for the current query function.
Declaration
public QueryColumnExpression GetQueryColumnExpression()
Returns
Type | Description |
---|---|
QueryColumnExpression | The QueryColumnExpression instance for the current query function. |
GetQueryColumnExpressions()
Gets the collection of the query column expression for the current query function.
Declaration
public QueryColumnExpressionCollection GetQueryColumnExpressions()
Returns
Type | Description |
---|---|
QueryColumnExpressionCollection | The QueryColumnExpression collection for the current query function. |
Multiply(QueryFunction, QueryFunction)
Gets the expression of multiplying the passed-in expression functions.
Declaration
public static QueryColumnExpression Multiply(QueryFunction leftOperand, QueryFunction rightOperand)
Parameters
Type | Name | Description |
---|---|---|
QueryFunction | leftOperand | The expression function – left operand in the multiplication operation. |
QueryFunction | rightOperand | The expression function – right operand in the multiplication operation. |
Returns
Type | Description |
---|---|
QueryColumnExpression | The QueryColumnExpression instance that is the product of the |
Negate(QueryFunction)
Gets the expression that negates the value of the passed-in function.
Declaration
public static QueryColumnExpression Negate(QueryFunction operand)
Parameters
Type | Name | Description |
---|---|---|
QueryFunction | operand | The expression function. |
Returns
Type | Description |
---|---|
QueryColumnExpression | The column expression that represents the negation of the |
Subtract(QueryFunction, QueryFunction)
Gets the expression of subtraction of the passed-in right expression function from the passed-in left expression function.
Declaration
public static QueryColumnExpression Subtract(QueryFunction leftOperand, QueryFunction rightOperand)
Parameters
Type | Name | Description |
---|---|---|
QueryFunction | leftOperand | The expression function – left operand in the subtraction operation. |
QueryFunction | rightOperand | The expression function – right operand in the subtraction operation. |
Returns
Type | Description |
---|---|
QueryColumnExpression | The QueryColumnExpression instance that represents the difference of the |
Operators
Addition(QueryFunction, QueryFunction)
Overloads the operator of adding two expression functions.
Declaration
public static QueryColumnExpression operator +(QueryFunction leftOperand, QueryFunction rightOperand)
Parameters
Type | Name | Description |
---|---|---|
QueryFunction | leftOperand | The expression function – left operand in the addition operation. |
QueryFunction | rightOperand | The expression function – right operand in the addition operation. |
Returns
Type | Description |
---|---|
QueryColumnExpression | The QueryColumnExpression instance that represents the sum of the |
Division(QueryFunction, QueryFunction)
Overloads the operator of dividing two expression functions.
Declaration
public static QueryColumnExpression operator /(QueryFunction leftOperand, QueryFunction rightOperand)
Parameters
Type | Name | Description |
---|---|---|
QueryFunction | leftOperand | The expression function – left operand in the division operation. |
QueryFunction | rightOperand | The expression function – right operand in the division operation. |
Returns
Type | Description |
---|---|
QueryColumnExpression | The QueryColumnExpression instance that represents the quotient of the |
Multiply(QueryFunction, QueryFunction)
Overloads the operator of multiplying two expression functions.
Declaration
public static QueryColumnExpression operator *(QueryFunction leftOperand, QueryFunction rightOperand)
Parameters
Type | Name | Description |
---|---|---|
QueryFunction | leftOperand | The query function – left operand in the multiplication operation. |
QueryFunction | rightOperand | The query function – right operand in the multiplication operation. |
Returns
Type | Description |
---|---|
QueryColumnExpression | The QueryColumnExpression instance that represents the product of the |
Subtraction(QueryFunction, QueryFunction)
Overloads the operator of subtracting the right expression function from the left expression function.
Declaration
public static QueryColumnExpression operator -(QueryFunction leftOperand, QueryFunction rightOperand)
Parameters
Type | Name | Description |
---|---|---|
QueryFunction | leftOperand | The expression function – left operand in the subtraction operation. |
QueryFunction | rightOperand | The expression function – right operand in the subtraction operation. |
Returns
Type | Description |
---|---|
QueryColumnExpression | The QueryColumnExpression instance that represents the difference of the operands |
UnaryNegation(QueryFunction)
Overloads the operator of negating the passed-in expression function.
Declaration
public static QueryColumnExpression operator -(QueryFunction operand)
Parameters
Type | Name | Description |
---|---|---|
QueryFunction | operand | The expression function. |
Returns
Type | Description |
---|---|
QueryColumnExpression | Negates the value of the |