Class EntitySchemaQueryExpression
Expression of the entity schema query.
Inherited Members
Namespace: Terrasoft.Core.Entities
Assembly: Terrasoft.Core.dll
Syntax
public class EntitySchemaQueryExpression : MetaItem, IMetaItem, IMetaDataSerializable, ICloneable
Constructors
EntitySchemaQueryExpression()
Initializes a new EntitySchemaQueryExpression instance.
Declaration
public EntitySchemaQueryExpression()
EntitySchemaQueryExpression(ArithmeticOperation, EntitySchemaQueryExpression, EntitySchemaQueryExpression)
Initializes the EntitySchemaQueryExpression instance for the arithmetic operation with the specified operands.
Declaration
public EntitySchemaQueryExpression(ArithmeticOperation arithmeticOperation, EntitySchemaQueryExpression leftArithmeticOperand, EntitySchemaQueryExpression rightArithmeticOperand)
Parameters
Type | Name | Description |
---|---|---|
ArithmeticOperation | arithmeticOperation | Arithmetic operation. |
EntitySchemaQueryExpression | leftArithmeticOperand | The left operand of the arithmetic operation. |
EntitySchemaQueryExpression | rightArithmeticOperand | The right operand of the arithmetic operation. |
EntitySchemaQueryExpression(EntitySchema, String)
Initializes the EntitySchemaQueryExpression instance for the column in a path specified in relation to the root schema.
Declaration
public EntitySchemaQueryExpression(EntitySchema rootSchema, string schemaColumnPath)
Parameters
Type | Name | Description |
---|---|---|
EntitySchema | rootSchema | The root schema in relation to which the expression is built. |
System.String | schemaColumnPath | String of path to the column for which the expression is built. |
EntitySchemaQueryExpression(EntitySchema, EntitySchemaColumn, String)
Initializes the EntitySchemaQueryExpression instance for the specified instance of the column of the entity schema that is in a path specified in relation to the root schema.
Declaration
public EntitySchemaQueryExpression(EntitySchema rootSchema, EntitySchemaColumn schemaColumn, string schemaColumnPath)
Parameters
Type | Name | Description |
---|---|---|
EntitySchema | rootSchema | The root schema in relation to which the expression is built. |
EntitySchemaColumn | schemaColumn | Instance of the column of the entity schema, for which the expression is built. |
System.String | schemaColumnPath | String of path to the |
EntitySchemaQueryExpression(EntitySchemaQuery)
Initializes the EntitySchemaQueryExpression instance for the specified entity schema subquery.
Declaration
public EntitySchemaQueryExpression(EntitySchemaQuery subQuery)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQuery | subQuery | Entity schema subquery, for which the expression is built. |
EntitySchemaQueryExpression(EntitySchemaQueryExpression)
Initializes the EntitySchemaQueryExpression instance that is a clone of the passed-in expression of the entity schema query.
Declaration
public EntitySchemaQueryExpression(EntitySchemaQueryExpression source)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryExpression | source | The entity schema query expression for which the clone is created. |
EntitySchemaQueryExpression(EntitySchemaQueryExpressionType)
Initializes the EntitySchemaQueryExpression instance with the specified type of expression of the entity schema query.
Declaration
public EntitySchemaQueryExpression(EntitySchemaQueryExpressionType expressionType)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryExpressionType | expressionType | Expression type of the entity schema query. |
EntitySchemaQueryExpression(EntitySchemaQueryFunction)
Initializes the EntitySchemaQueryExpression instance for the specified function of the entity schema query.
Declaration
public EntitySchemaQueryExpression(EntitySchemaQueryFunction function)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryFunction | function | The query function to the schema of the object for which the expression is constructed. |
Properties
ArithmeticOperation
Arithmetic operation.
Declaration
public ArithmeticOperation ArithmeticOperation { get; set; }
Property Value
Type | Description |
---|---|
ArithmeticOperation |
DisplayValue
Declaration
public string DisplayValue { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ExpressionType
The expression type.
Declaration
public EntitySchemaQueryExpressionType ExpressionType { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaQueryExpressionType |
Function
The expression function.
Declaration
public EntitySchemaQueryFunction Function { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaQueryFunction |
IsAggregationFunction
Indicates whether the expression is an aggregate function.
Declaration
public bool IsAggregationFunction { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsBlock
Determines whether the expression is placed in block.
Declaration
public bool IsBlock { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInExpressionTypeChanged
Determines whether the handling of the ExpressionTypeChanged event is performed.
Declaration
public bool IsInExpressionTypeChanged { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInExpressionTypeChanging
Determines whether the handling of the ExpressionTypeChanging event is performed.
Declaration
public bool IsInExpressionTypeChanging { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInFunctionChanged
Determines whether the handling of FunctionChanged is performed.
Declaration
public bool IsInFunctionChanged { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInFunctionChanging
Determines whether the handling of the FunctionChanging event is performed.
Declaration
public bool IsInFunctionChanging { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInParameterValueChanged
Determines whether the handling of the ParameterValueChanged event is performed.
Declaration
public bool IsInParameterValueChanged { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInParameterValueChanging
Determines whether the handling of the ParameterValueChanging event is performed.
Declaration
public bool IsInParameterValueChanging { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInParameterValueForcedTypeChanged
Determines whether the handling of the ParameterValueForcedTypeChanged event is performed.
Declaration
public bool IsInParameterValueForcedTypeChanged { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInParameterValueForcedTypeChanging
Determines whether the handling of the ParameterValueForcedTypeChanging event is performed.
Declaration
public bool IsInParameterValueForcedTypeChanging { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsNegative
Determines whether the expression is a negation.
Declaration
public bool IsNegative { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsSubQuery
Indicates whether the expression is a subquery.
Declaration
public bool IsSubQuery { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
JoinPath
Path to the linked table of the expression column.
Declaration
public string JoinPath { get; }
Property Value
Type | Description |
---|---|
System.String |
LeftArithmeticOperand
The left operand of the arithmetic operation.
Declaration
public EntitySchemaQueryExpression LeftArithmeticOperand { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaQueryExpression |
ParameterValue
The value of the parameter.
Declaration
public object ParameterValue { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
ParameterValueForcedType
The typed value of the parameter.
Declaration
public DataValueType ParameterValueForcedType { get; set; }
Property Value
Type | Description |
---|---|
DataValueType |
ParentQuery
Parent entity schema query.
Declaration
public EntitySchemaQuery ParentQuery { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaQuery |
Path
Full path to the expression column.
Declaration
public string Path { get; set; }
Property Value
Type | Description |
---|---|
System.String |
QueryColumnAlias
The query column alias.
Declaration
public string QueryColumnAlias { get; }
Property Value
Type | Description |
---|---|
System.String |
RightArithmeticOperand
The right operand of the arithmetic operation.
Declaration
public EntitySchemaQueryExpression RightArithmeticOperand { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaQueryExpression |
RootSchema
The root schema.
Declaration
public EntitySchema RootSchema { get; }
Property Value
Type | Description |
---|---|
EntitySchema |
SchemaColumn
Instance of the schema column.
Declaration
public EntitySchemaColumn SchemaColumn { get; }
Property Value
Type | Description |
---|---|
EntitySchemaColumn |
SchemaColumnName
Name of the schema column.
Declaration
public string SchemaColumnName { get; }
Property Value
Type | Description |
---|---|
System.String |
SourceAlias
The alias of the data source.
Declaration
public string SourceAlias { get; }
Property Value
Type | Description |
---|---|
System.String |
SourceName
Data source.
Declaration
public string SourceName { get; }
Property Value
Type | Description |
---|---|
System.String |
SubQuery
Entity schema subquery.
Declaration
public EntitySchemaQuery SubQuery { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaQuery |
SubQueryOptions
Parameters of the entity schema subquery.
Declaration
public EntitySchemaQueryOptions SubQueryOptions { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaQueryOptions |
Methods
ApplyMetaDataValue(DataReader)
Declaration
protected override void ApplyMetaDataValue(DataReader reader)
Parameters
Type | Name | Description |
---|---|---|
DataReader | reader |
Overrides
Clone()
Gets the System.Object instance that is a clone of the current EntitySchemaQueryExpression instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | The System.Object instance that is a clone of the current EntitySchemaQueryExpression instance. |
Overrides
CreateQueryColumnExpression(DBSecurityEngine)
Creates QueryColumnExpression for current expression with defined access rights.
Declaration
public QueryColumnExpression CreateQueryColumnExpression(DBSecurityEngine dbSecurityEngine)
Parameters
Type | Name | Description |
---|---|---|
DBSecurityEngine | dbSecurityEngine | The instance of the DBSecurityEngine class that defines database access rights to schemas object for current expression. |
Returns
Type | Description |
---|---|
QueryColumnExpression | Query column expression. |
GetCaption()
Gets a header to display the current query expression to the object schema.
Declaration
public string GetCaption()
Returns
Type | Description |
---|---|
System.String | The header to display the current query expression to the object schema. |
Exceptions
Type | Condition |
---|---|
UnsupportedTypeException | If the current query expression has the unsupported type. |
GetJoinPath(String)
Gets the path to the linked table from which the column expression is selected, by the specified full path to the expression column.
Declaration
public static string GetJoinPath(string columnPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | columnPath | Full path to the expression column. |
Returns
Type | Description |
---|---|
System.String | Path to the linked table of the expression column. |
Exceptions
Type | Condition |
---|---|
ArgumentNullOrEmptyException | If the empty value or |
GetResultDataValueType(DataValueTypeManager)
Gets the data type of the current query expression to the object schema using the passed data type manager.
Declaration
public DataValueType GetResultDataValueType(DataValueTypeManager dataValueTypeManager)
Parameters
Type | Name | Description |
---|---|---|
DataValueTypeManager | dataValueTypeManager | Data type manager. |
Returns
Type | Description |
---|---|
DataValueType | Data type of the current expression of the entity schema query. |
Exceptions
Type | Condition |
---|---|
UnsupportedTypeException | If the current query expression has the unsupported type. |
OnExpressionTypeChanged(EntitySchemaQueryExpressionTypeChangedEventArgs)
Declaration
protected virtual void OnExpressionTypeChanged(EntitySchemaQueryExpressionTypeChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryExpressionTypeChangedEventArgs | e |
OnExpressionTypeChanging(EntitySchemaQueryExpressionTypeBeforeChangedEventArgs)
Declaration
protected virtual void OnExpressionTypeChanging(EntitySchemaQueryExpressionTypeBeforeChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryExpressionTypeBeforeChangedEventArgs | e |
OnFunctionChanged(EntitySchemaQueryPropertyChangedEventArgs<EntitySchemaQueryFunction>)
Declaration
protected virtual void OnFunctionChanged(EntitySchemaQueryPropertyChangedEventArgs<EntitySchemaQueryFunction> e)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryPropertyChangedEventArgs<EntitySchemaQueryFunction> | e |
OnFunctionChanging(EntitySchemaQueryPropertyBeforeChangedEventArgs<EntitySchemaQueryFunction>)
Declaration
protected virtual void OnFunctionChanging(EntitySchemaQueryPropertyBeforeChangedEventArgs<EntitySchemaQueryFunction> e)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryPropertyBeforeChangedEventArgs<EntitySchemaQueryFunction> | e |
OnParameterValueChanged(EntitySchemaQueryPropertyChangedEventArgs<Object>)
Declaration
protected virtual void OnParameterValueChanged(EntitySchemaQueryPropertyChangedEventArgs<object> e)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryPropertyChangedEventArgs<System.Object> | e |
OnParameterValueChanging(EntitySchemaQueryPropertyBeforeChangedEventArgs<Object>)
Declaration
protected virtual void OnParameterValueChanging(EntitySchemaQueryPropertyBeforeChangedEventArgs<object> e)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryPropertyBeforeChangedEventArgs<System.Object> | e |
OnParameterValueForcedTypeChanged(EntitySchemaQueryPropertyChangedEventArgs<DataValueType>)
Declaration
protected virtual void OnParameterValueForcedTypeChanged(EntitySchemaQueryPropertyChangedEventArgs<DataValueType> e)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryPropertyChangedEventArgs<DataValueType> | e |
OnParameterValueForcedTypeChanging(EntitySchemaQueryPropertyBeforeChangedEventArgs<DataValueType>)
Declaration
protected virtual void OnParameterValueForcedTypeChanging(EntitySchemaQueryPropertyBeforeChangedEventArgs<DataValueType> e)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryPropertyBeforeChangedEventArgs<DataValueType> | e |
WriteMetaData(DataWriter)
Serializes the query expression to the object schema using the DataWriter specified instance.
Declaration
public override void WriteMetaData(DataWriter writer)
Parameters
Type | Name | Description |
---|---|---|
DataWriter | writer | The DataWriter instance used for serialization. |
Overrides
Events
ExpressionTypeChanged
An event that occurs after changing the type of the query expression to the object schema.
Declaration
public event EventHandler<EntitySchemaQueryExpressionTypeChangedEventArgs> ExpressionTypeChanged
Event Type
Type | Description |
---|---|
System.EventHandler<EntitySchemaQueryExpressionTypeChangedEventArgs> |
ExpressionTypeChanging
An event that occurs before changing the type of the query expression to the object schema.
Declaration
public event EventHandler<EntitySchemaQueryExpressionTypeBeforeChangedEventArgs> ExpressionTypeChanging
Event Type
Type | Description |
---|---|
System.EventHandler<EntitySchemaQueryExpressionTypeBeforeChangedEventArgs> |
FunctionChanged
An event that occurs after the query function has changed to an object schema.
Declaration
public event EventHandler<EntitySchemaQueryPropertyChangedEventArgs<EntitySchemaQueryFunction>> FunctionChanged
Event Type
Type | Description |
---|---|
System.EventHandler<EntitySchemaQueryPropertyChangedEventArgs<EntitySchemaQueryFunction>> |
FunctionChanging
An event that occurs before the query function changes to an object schema.
Declaration
public event EventHandler<EntitySchemaQueryPropertyBeforeChangedEventArgs<EntitySchemaQueryFunction>> FunctionChanging
Event Type
Type | Description |
---|---|
System.EventHandler<EntitySchemaQueryPropertyBeforeChangedEventArgs<EntitySchemaQueryFunction>> |
ParameterValueChanged
An event that occurs after changing the value of the query parameter to the object schema.
Declaration
public event EventHandler<EntitySchemaQueryPropertyChangedEventArgs<object>> ParameterValueChanged
Event Type
Type | Description |
---|---|
System.EventHandler<EntitySchemaQueryPropertyChangedEventArgs<System.Object>> |
ParameterValueChanging
An event that occurs before the value of the query parameter changes to an object schema.
Declaration
public event EventHandler<EntitySchemaQueryPropertyBeforeChangedEventArgs<object>> ParameterValueChanging
Event Type
Type | Description |
---|---|
System.EventHandler<EntitySchemaQueryPropertyBeforeChangedEventArgs<System.Object>> |
ParameterValueForcedTypeChanged
Event that occurs after changing the typed parameter value.
Declaration
public event EventHandler<EntitySchemaQueryPropertyChangedEventArgs<DataValueType>> ParameterValueForcedTypeChanged
Event Type
Type | Description |
---|---|
System.EventHandler<EntitySchemaQueryPropertyChangedEventArgs<DataValueType>> |
ParameterValueForcedTypeChanging
Event that occurs before changing the typed parameter value.
Declaration
public event EventHandler<EntitySchemaQueryPropertyBeforeChangedEventArgs<DataValueType>> ParameterValueForcedTypeChanging
Event Type
Type | Description |
---|---|
System.EventHandler<EntitySchemaQueryPropertyBeforeChangedEventArgs<DataValueType>> |
Operators
Addition(EntitySchemaQueryExpression, Double)
Overloads the operator of the arithmetic addition for expressions of queries against entity schemas.
Declaration
public static EntitySchemaQueryExpression operator +(EntitySchemaQueryExpression leftOperand, double rightOperand)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryExpression | leftOperand | Expression of the query to the object schema – right operand in the addition operation. |
System.Double | rightOperand | Value of the System.Double type – left operand in the addition operation. |
Returns
Type | Description |
---|---|
EntitySchemaQueryExpression | A new expression of the query to the object schema that represents the sum of the |
Addition(EntitySchemaQueryExpression, EntitySchemaQueryExpression)
Overloads the operator of the arithmetic addition for expressions of queries against entity schemas.
Declaration
public static EntitySchemaQueryExpression operator +(EntitySchemaQueryExpression leftOperand, EntitySchemaQueryExpression rightOperand)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryExpression | leftOperand | Expression of the query to the object schema – left operand in the addition operation. |
EntitySchemaQueryExpression | rightOperand | Expression of the query to the object schema – right operand in the addition operation. |
Returns
Type | Description |
---|---|
EntitySchemaQueryExpression | A new expression of the query to the object schema that represents the sum of the |
Division(EntitySchemaQueryExpression, Double)
Overloads the operator of the arithmetic division for expressions of queries against entity schemas.
Declaration
public static EntitySchemaQueryExpression operator /(EntitySchemaQueryExpression leftOperand, double rightOperand)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryExpression | leftOperand | Expression of the query to the object schema – left operand in the division operation. |
System.Double | rightOperand | Value of the System.Double type – right operand in the division operation. |
Returns
Type | Description |
---|---|
EntitySchemaQueryExpression | A new expression of the query to the object schema that represents the division result of the |
Division(EntitySchemaQueryExpression, EntitySchemaQueryExpression)
Overloads the operator of the arithmetic division for expressions of queries against entity schemas.
Declaration
public static EntitySchemaQueryExpression operator /(EntitySchemaQueryExpression leftOperand, EntitySchemaQueryExpression rightOperand)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryExpression | leftOperand | Expression of the query to the object schema – left operand in the division operation. |
EntitySchemaQueryExpression | rightOperand | Expression of the query to the object schema – right operand in the division operation. |
Returns
Type | Description |
---|---|
EntitySchemaQueryExpression | A new expression of the query to the object schema that represents the division result of the |
Multiply(EntitySchemaQueryExpression, Double)
Overloads the operator of the arithmetic multiplication for expressions of queries against entity schemas.
Declaration
public static EntitySchemaQueryExpression operator *(EntitySchemaQueryExpression leftOperand, double rightOperand)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryExpression | leftOperand | Expression of the query to the object schema – left operand in the multiplication operation. |
System.Double | rightOperand | Value of the System.Double type – right operand in the multiplication operation. |
Returns
Type | Description |
---|---|
EntitySchemaQueryExpression | A new expression of the query to the object schema that represents the multiplication result of the |
Multiply(EntitySchemaQueryExpression, EntitySchemaQueryExpression)
Overloads the operator of the arithmetic multiplication for expressions of queries against entity schemas.
Declaration
public static EntitySchemaQueryExpression operator *(EntitySchemaQueryExpression leftOperand, EntitySchemaQueryExpression rightOperand)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryExpression | leftOperand | Expression of the query to the object schema – left operand in the multiplication operation. |
EntitySchemaQueryExpression | rightOperand | Expression of the query to the object schema – right operand in the multiplication operation. |
Returns
Type | Description |
---|---|
EntitySchemaQueryExpression | A new expression of the query to the object schema that represents the multiplication of the |
Subtraction(EntitySchemaQueryExpression, Double)
Overloads the operator of the arithmetic subtraction for expressions of queries against entity schemas.
Declaration
public static EntitySchemaQueryExpression operator -(EntitySchemaQueryExpression leftOperand, double rightOperand)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryExpression | leftOperand | Expression of the query to the object schema – right operand in the subtraction operation. |
System.Double | rightOperand | Value of the System.Double type – left operand of the expression value. |
Returns
Type | Description |
---|---|
EntitySchemaQueryExpression | A new expression of the query to the object schema that represents the subtraction of the |
Subtraction(EntitySchemaQueryExpression, EntitySchemaQueryExpression)
Overloads the operator of the arithmetic subtraction for expressions of queries against entity schemas.
Declaration
public static EntitySchemaQueryExpression operator -(EntitySchemaQueryExpression leftOperand, EntitySchemaQueryExpression rightOperand)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryExpression | leftOperand | Expression of the query to the object schema – left operand in the subtraction operation. |
EntitySchemaQueryExpression | rightOperand | Expression of the query to the object schema – right operand in the subtraction operation. |
Returns
Type | Description |
---|---|
EntitySchemaQueryExpression | A new expression of the query to the object schema that represents the subtraction of the |