Class SubstringQueryFunction
Function which gets part of a string.
Inherited Members
Namespace: Terrasoft.Core.DB
Assembly: Terrasoft.Core.dll
Syntax
public class SubstringQueryFunction : QueryFunction, IQueryColumnExpressionConvertible, IQueryColumnExpressionsCollector, ICloneable
Constructors
SubstringQueryFunction(IQueryColumnExpressionConvertible, Int32, Int32)
Initializes new instance of SubstringQueryFunction class with specified column expression, substring start position and length.
Declaration
public SubstringQueryFunction(IQueryColumnExpressionConvertible expression, int start, int length)
Parameters
Type | Name | Description |
---|---|---|
IQueryColumnExpressionConvertible | expression | Column expression. |
System.Int32 | start | Substring start position. |
System.Int32 | length | Substring length |
SubstringQueryFunction(QueryColumnExpression, Int32, Int32)
Initializes new instance of SubstringQueryFunction class with specified column expression, substring start position and length.
Declaration
public SubstringQueryFunction(QueryColumnExpression expression, int start, int length)
Parameters
Type | Name | Description |
---|---|---|
QueryColumnExpression | expression | Column expression. |
System.Int32 | start | Substring start position. |
System.Int32 | length | Substring length |
SubstringQueryFunction(SubstringQueryFunction)
Initializes new instance of SubstringQueryFunction class by source function cloning.
Declaration
public SubstringQueryFunction(SubstringQueryFunction source)
Parameters
Type | Name | Description |
---|---|---|
SubstringQueryFunction | source | Source function. |
Properties
Expression
Column expression.
Declaration
public QueryColumnExpression Expression { get; set; }
Property Value
Type | Description |
---|---|
QueryColumnExpression |
LengthExpression
Substring length
Declaration
public QueryColumnExpression LengthExpression { get; set; }
Property Value
Type | Description |
---|---|
QueryColumnExpression |
StartExpression
Substring start position.
Declaration
public QueryColumnExpression StartExpression { get; set; }
Property Value
Type | Description |
---|---|
QueryColumnExpression |
Methods
AddQueryColumnExpressions(QueryColumnExpressionCollection)
Declaration
protected override void AddQueryColumnExpressions(QueryColumnExpressionCollection collection)
Parameters
Type | Name | Description |
---|---|---|
QueryColumnExpressionCollection | collection |
Overrides
AddUsingParameters(QueryParameterCollection)
Adds collection of query parameters to the function.
Declaration
public override void AddUsingParameters(QueryParameterCollection resultParameters)
Parameters
Type | Name | Description |
---|---|---|
QueryParameterCollection | resultParameters | Collection of query parameters. |
Overrides
BuildSqlText(StringBuilder, DBEngine)
Generates the request body using System.Text.StringBuilder and DBEngine.
Declaration
public override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Parameters
Type | Name | Description |
---|---|---|
System.Text.StringBuilder | sb | Instance of the System.Text.StringBuilder, which used in query builder. |
DBEngine | dbEngine | Instance of the DBEngine. |
Overrides
Clone()
Creates clone of the current instance SubstringQueryFunction
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | New instance SubstringQueryFunction, that is a clone of the current instance |