PartialComparisonExpression
Class: PartialComparisonExpression<T>
Defined in: packages/ql/src/query.ts:1699
A comparison expression that treats undefined attributes as a match in partial mode
When the builder is in partial mode and the target attribute is undefined,
evaluation returns true and flags the result as a partial match.
Extends
Type Parameters
T
T extends ComparisonOperator = ComparisonOperator
the specific comparison operator type
Constructors
Constructor
new PartialComparisonExpression<
T>(builder,op,attribute,value):PartialComparisonExpression<T>
Defined in: packages/ql/src/query.ts:1708
Parameters
builder
the partial expression builder (used to read partial mode flag)
op
T
comparison operator
attribute
string
dot-notation attribute path
value
any
value to compare against
Returns
PartialComparisonExpression<T>
Overrides
ComparisonExpression.constructor
Properties
attribute
attribute:
string[]
Defined in: packages/ql/src/query.ts:925
Attribute to read from the object (split by .)
Inherited from
ComparisonExpression.attribute
builder
protectedbuilder:PartialExpressionBuilder
Defined in: packages/ql/src/query.ts:1709
the partial expression builder (used to read partial mode flag)
operator
operator:
T
Defined in: packages/ql/src/query.ts:866
Inherited from
rawValue
rawValue:
DynamicValue|value| DynamicValue | value[] |null
Defined in: packages/ql/src/query.ts:921
Right side of the comparison (raw parsed value, possibly DynamicValue)
Inherited from
Accessors
value
Get Signature
get value():
value|value[] |null
Defined in: packages/ql/src/query.ts:941
Resolved value at evaluation time
Returns
value | value[] | null
the resolved scalar or array value
Set Signature
set value(
val):void
Defined in: packages/ql/src/query.ts:955
Set the raw value
Parameters
val
DynamicValue | value | DynamicValue | value[] | null
new value
Returns
void
Inherited from
Methods
eval()
eval(
target):boolean
Defined in: packages/ql/src/query.ts:1724
Override the eval to check if the attribute is present if not and we are in partial mode, return true
Parameters
target
any
the object to evaluate
Returns
boolean
true if the target matches
Overrides
isDynamic()
isDynamic():
boolean
Defined in: packages/ql/src/query.ts:962
Returns
boolean
Inherited from
ComparisonExpression.isDynamic
setAttributeValue()
setAttributeValue(
target):void
Defined in: packages/ql/src/query.ts:1024
Set the value of the attribute based on the assignment
If used as a Set expression
Parameters
target
any
the object to assign to
Returns
void
Inherited from
ComparisonExpression.setAttributeValue
toString()
toString():
string
Defined in: packages/ql/src/query.ts:1133
Returns
string
Inherited from
toStringAttribute()
toStringAttribute():
string
Defined in: packages/ql/src/query.ts:1118
Allow subclass to create different display
Returns
string
the attribute string
Inherited from
ComparisonExpression.toStringAttribute
toStringOperator()
toStringOperator():
T
Defined in: packages/ql/src/query.ts:1126
Allow subclass to create different display
Returns
T
the operator string
Inherited from
ComparisonExpression.toStringOperator
toStringValue()
toStringValue(
value):string
Defined in: packages/ql/src/query.ts:1098
Serialize a value to its WebdaQL string representation
Strings are double-quoted, booleans are uppercased, arrays are bracket-wrapped.
Dynamic values serialize to their canonical function call string (e.g. NOW('-10m')).
Parameters
value
DynamicValue | value | DynamicValue | value[] | null
the value to serialize
Returns
string
the serialized string
Inherited from
ComparisonExpression.toStringValue
getAttributeValue()
staticgetAttributeValue(target,attribute):any
Defined in: packages/ql/src/query.ts:1010
Traverse an object using a dot-notation attribute path
Parameters
target
any
object to read from
attribute
string[]
path segments (e.g. ["user", "profile", "name"])
Returns
any
the resolved value, or undefined if any segment is missing
Inherited from
ComparisonExpression.getAttributeValue
likeToRegex()
staticlikeToRegex(like):RegExp
Defined in: packages/ql/src/query.ts:983
Convert a SQL LIKE pattern to a JavaScript RegExp
%matches zero or more characters_matches exactly one character\%and\_are literal percent/underscore- Common regex metacharacters are escaped
Parameters
like
string
SQL LIKE pattern string
Returns
RegExp
compiled RegExp