EntityAttr class

Represents one entity attribute of data model.

public class Korzh.EasyQuery.EntityAttr
    : MetaEntityAttr, IComparable<EntityAttr>

Package: Korzh.EasyQuery (targets: netstandard2.0)

Assembly: Korzh.EasyQuery.dll

Properties

Name Type Description
CustomFunc string Gets or sets the custom function.
Editors EditorsMap Gets the editors map.
Entity Entity Gets or sets the entity.
HasSubQuery bool Gets or sets a value indicating whether this attribute includes a sub-query in its expression.
IsAggregate bool Gets or sets a value indicating whether this attribute represents some aggregate column.
IsGhost bool Gets a value indicating whether this is a "ghost attribute" - an attribute which was not found in the model.
LookupAttr EntityAttr The lookup attribute
Model DataModel Gets the model.
Operations OperatorList Gets the list of operators which can be applied for this attribute.
Params QueryParamList The parameters associated with this entity attribute
UseInConditions bool Gets or sets a value indicating whether the attribute can be used in query conditions.
UseInResult bool Gets or sets a value indicating whether the attribute can be used in result columns (SELECT clause).
UseInSorting bool Gets or sets a value indicating whether the attribute can be used in sorting.

Methods

Name Type Description
AddParamsTo(QueryParamList paramList) void Adds all query parameters used in this attribute to the list passed via paramList.
CopyFrom(EntityAttr attr) void Copies all attribute's properties from another entity attribute
ExtractParams() void Parse attribute's expression and extract all parameters (like @Param1) used there.
FillOperatorsWithDefaults(DataModel model) void Fills the operators list with default operators depending of attribute type.
GetDefaultOperator() Operator Gets the default operator (usually it is first operator in Operations list).
GetValueEditor(Operator op, int operandIndex) ValueEditor Gets the most suitable value editor for this attribute and operator.
HasParams() bool Determines whether this attribute has parameters in its expression.
Hide() void Hides this entity attribute. It means that this function just sets all UseInResult, UseInConditions and UseInSorting properties to false.
OnModelAssignment() void Called when model is assigned.
ProcessVirtualExpr() void Scans attribute's expression for new parameters, tables, etc
ReadPropertyFromJsonAsync(JsonReader reader, string propName) Task Reads one attribute's property from JSON (asynchronous way).
SetDefaultOperator(Operator op) void Sets the default operator.
WritePropertiesToJsonAsync(JsonWriter writer, BitOptions rwOptions) Task Writes attribute properties to JSON (asynchronous way).