Skip to main content

@webda/coreReadme | API


Class: ComparisonExpression<T>

Comparison expression

Extends

Type parameters

T extends ComparisonOperator = ComparisonOperator

Constructors

new ComparisonExpression(operator, attribute, value)

new ComparisonExpression<T>(operator, attribute, value): ComparisonExpression<T>

Parameters

operator: T

of the expression

attribute: string

of the object to read

value: any[] | value

Returns

ComparisonExpression<T>

Overrides

Expression.constructor

Source

packages/core/src/stores/webdaql/query.ts:355

Properties

attribute

attribute: string[]

Attribute to read from the object (split by .)

Source

packages/core/src/stores/webdaql/query.ts:348


operator

operator: T

Inherited from

Expression.operator

Source

packages/core/src/stores/webdaql/query.ts:318


value

value: value | value[]

Right side of the comparison

Source

packages/core/src/stores/webdaql/query.ts:344

Methods

eval()

eval(target): boolean

Parameters

target: any

Returns

boolean

Overrides

Expression.eval

Source

packages/core/src/stores/webdaql/query.ts:418


setAttributeValue()

setAttributeValue(target): void

Set the value of the attribute based on the assignment

If used as a Set expression

Parameters

target: any

Returns

void

Source

packages/core/src/stores/webdaql/query.ts:401


toString()

toString(): string

Returns

string

Overrides

Expression.toString

Source

packages/core/src/stores/webdaql/query.ts:483


toStringAttribute()

toStringAttribute(): string

Allow subclass to create different display

Returns

string

Source

packages/core/src/stores/webdaql/query.ts:469


toStringOperator()

toStringOperator(): T

Allow subclass to create different display

Returns

T

Source

packages/core/src/stores/webdaql/query.ts:476


toStringValue()

toStringValue(value): string

Return a string represantation of a value

Parameters

value: value | value[]

Returns

string

Source

packages/core/src/stores/webdaql/query.ts:453


getAttributeValue()

static getAttributeValue(target, attribute): any

Read the value from the object

Parameters

target: any

attribute: string[]

Returns

any

Source

packages/core/src/stores/webdaql/query.ts:387


likeToRegex()

static likeToRegex(like): RegExp

Parameters

like: string

Returns

RegExp

Source

packages/core/src/stores/webdaql/query.ts:361