Skip to content

Condition class

Represents some condition.

ExpressionParent


The default constructor. ⊕ new Condition(query: Query,tag?: CondTag): Condition



The block id.

● blockId: string


The list of expression.

● expressions: Expression[]


Condition enabled option.

● justAdded: boolean


The linking type.

● linkType: LinkType = LinkType.All


The condition tag.

● tag: CondTag



The value indicating whether this Condition is enabled.

● _enabled: boolean


● _id: string


The list of conditions.

● conditions: Condition[]


● parent: Condition = null


● query: Query



⇄ get enabled(): boolean

Returns boolean


⇄ set enabled(value: boolean): void

  • value: boolean

Returns void


⇄ get id(): string

Returns string



▸ addCondition(cond: Condition): number

Returns number


▸ addExpressionByOperand(operand: Operand,val?: string): Expression

  • operand: Operand
  • val: string, Default value = null

Returns Expression


▸ clearConditions(): void

Returns void


▸ expressionChanged(expr: Expression,oldValue: string): void

Returns void


▸ fireChangedEvent(): void

Returns void


▸ getConditions(): Condition[]

Returns Condition[]


▸ getExpressionIndex(expr: Expression): number

Returns number


▸ getLevel(): number

Returns number


▸ getModel(): DataModel

Returns DataModel


▸ getOperatorId(): string

Returns string


▸ getParent(): Condition

Returns Condition


▸ getQuery(): Query

Returns Query


▸ isEmpty(): boolean

Returns boolean


▸ isGroup(): boolean

Returns boolean


Indicates whether this condition must be placed into JOIN clause in result SQL.

▸ isInJoin(): boolean

Returns boolean


The value indicating whether this condition is parameterized.

▸ isParameterized(): boolean

Returns boolean


Indicates whether this condition is read-only.

▸ isReadOnly(): boolean

Returns boolean


Loads condtion from its JSON representation object.

▸ loadFromData(model: DataModel,data: ConditionData): void

Returns void


▸ removeConditionAt(index: number): void

  • index: number

Returns void


Saves condition to JSON representation object.

▸ saveToData(): ConditionData

Returns ConditionData - The JSON representation object.


▸ setInJoin(value: boolean): void

  • value: boolean

Returns void


▸ setOperatorId(newOperatorId: string,silent?: boolean): void

  • newOperatorId: string
  • silent: boolean, Default value = false

Returns void


▸ setParameterized(value: boolean): void

  • value: boolean

Returns void


▸ setParent(parent: Condition): void

Returns void


▸ setReadOnly(value: boolean): void

  • value: boolean

Returns void