Skip to main content

entityattr-class

Represents one entity attribute of data model.

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

Assembly: Korzh.EasyQuery.dll

Properties

NameTypeDescription
CustomFuncstringGets or sets the custom function.
EditorsEditorsMapGets the editors map.
EntityEntityGets or sets the entity.
HasSubQueryboolGets or sets a value indicating whether this attribute includes a sub-query in its expression.
IsAggregateboolGets or sets a value indicating whether this attribute represents some aggregate column.
IsGhostboolGets a value indicating whether this is a "ghost attribute" - an attribute which was not found in the model.
LookupAttrEntityAttrThe lookup attribute
ModelDataModelGets the model.
OperationsOperatorListGets the list of operators which can be applied for this attribute.
ParamsQueryParamListThe parameters associated with this entity attribute
UseInConditionsboolGets or sets a value indicating whether the attribute can be used in query conditions.
UseInResultboolGets or sets a value indicating whether the attribute can be used in result columns (SELECT clause).
UseInSortingboolGets or sets a value indicating whether the attribute can be used in sorting.

Methods

NameTypeDescription
AddParamsTo(QueryParamList paramList)voidAdds all query parameters used in this attribute to the list passed via paramList.
CopyFrom(EntityAttr attr)voidCopies all attribute's properties from another entity attribute
ExtractParamsFromExpr()voidParse attribute's expression and extract all parameters (like @Param1) used there.
FillOperatorsWithDefaults(DataModel model = null)voidFills the operators list with default operators depending of attribute type.
GetDefaultOperator()OperatorGets the default operator (usually it is first operator in Operations list).
GetValueEditor(Operator op, int operandIndex)ValueEditorGets the most suitable value editor for this attribute and operator.
HasParams()boolDetermines whether this attribute has parameters in its expression.
Hide()voidHides this entity attribute. It means that this function just sets all UseInResult, UseInConditions and UseInSorting properties to false.
OnModelAssignment()voidCalled when model is assigned.
ProcessVirtualExpr()voidScans attribute's expression for new parameters, tables, etc
ReadPropertyFromJsonAsync(JsonReader reader, string propName, CancellationToken ct)TaskReads one attribute's property from JSON (asynchronous way).
SetDefaultOperator(Operator op)voidSets the default operator.
WritePropertiesToJsonAsync(JsonWriter writer, BitOptions rwOptions, CancellationToken ct)TaskWrites attribute properties to JSON (asynchronous way).