Skip to main content

OrExpression

@webda/ql


Class: OrExpression

Defined in: packages/ql/src/query.ts:749

Logical OR expression — evaluates to true if any child is true

Uses short-circuit evaluation: returns true as soon as any child passes. An empty OR (no children) evaluates to true.

Extends​

Constructors​

Constructor​

new OrExpression(children): OrExpression

Defined in: packages/ql/src/query.ts:753

Parameters​

children​

Expression<string>[]

Expressions to use for OR

Returns​

OrExpression

Overrides​

LogicalExpression.constructor

Properties​

children​

children: Expression<string>[] = []

Defined in: packages/ql/src/query.ts:694

Child expressions combined by this logical operator

Inherited from​

LogicalExpression.children


operator​

operator: "OR"

Defined in: packages/ql/src/query.ts:463

Inherited from​

LogicalExpression.operator

Methods​

eval()​

eval(target): boolean

Defined in: packages/ql/src/query.ts:760

Parameters​

target​

any

Returns​

boolean

Overrides​

LogicalExpression.eval


toString()​

toString(depth?): string

Defined in: packages/ql/src/query.ts:708

Parameters​

depth?​

number = 0

Returns​

string

Inherited from​

LogicalExpression.toString