Skip to content

SimpleCondition class

Represents the default condition with {field} {operator} {value} structure.

public abstract class Korzh.EasyQuery.SimpleCondition
: Condition
TypeNameDescription
EqExpressionBaseExprGets or sets the base expression of the condtion.
OperandDefaultOperandGets the default operand.
SimpleCondExprListExpressionsGets the list of all expressions used in condition. First expression in the list is base expression.
OperatorOperatorGets or sets the operator used in this condition.
StringTypeNameGets the name of the condition type. The same as STypeName but works for one particular instance of SimpleCondition class.
TypeNameDescription
voidAdjustOperator()Adjusts the operator by base expression.
voidAttachExpr(EqExpression expr)Attaches the handler for expression’s OnContentChange event to DoExprContentChanged method
EqExpressionCreateValueExpr(Int32 index)Creates the value expression.
EqExpressionCreateValueExprByOperand(Operand opnd)Creates a value expression by operand.
voidDetachExpr(EqExpression expr)Detaches the handler for expression’s OnContentChange event
voidDoExprContentChanged(Object sender, EventArgs e)Does the expr changed.
EntityAttrGetBaseAttr()Gets the base entity attribute for this condition.
OperandGetOperand(Int32 index)Gets the condition operand based on its index. Index 0 stands for an attribute
StringGetText(QueryTextFormats formats, String levelSpace, String prefix)Returns text representation of condition
IEnumerable<Entity>GetUsedEntities()Gets the list of all entities used in condition.
voidLoadFromJsonDict(JsonDict dictCond)Loads condition from IDictionary. Used during loading query from JSON
voidLoadFromXmlReader(XmlReader reader)Loads Korzh.EasyQuery.SimpleCondition properties from XML reader.
EqExpressionRecreateValueExpr(Int32 index)Recreates the value expression.
voidSetOperator(Operator newOperator)Sets the operator.
voidSetOperatorSilent(Operator newOperator)Sets the operator in “silent” mode (no event is raised, no expression is adjusted).
voidSetValueExpr(Int32 index, EqExpression expr)Sets the value expression.
voidWriteContent(XmlWriter writer)Writes the content of condition to XmlWriter object.
TypeNameDescription
StringSTypeNameGets the name of the condition type used for saving to XML.