$k. AttributeValueCondition#

Selects attributes that match a specified value with regard to a comparison operator

Extends#

Methods#

alternativesId() → {number}#

Since
  • 4.1.0
Deprecated
  • This function is not supported any more
Returns:
Type: 
number

attributeCondition() → {$k.HasAttributeCondition}#

Returns the attribute condition

Since
  • 4.1.0

defaultValue() → {any}#

Returns the default value. The default is used if no parameter for this condition is supplied

Since
  • 4.1.0
Returns:
Type: 
any

ignoreCase() → {boolean}#

Returns true if equality is case insensitive. Only applies to string attributes and equality operators

Since
  • 4.1.0
Returns:
Type: 
boolean

operator() → {string|undefined}#

Returns the comparison operator

Since
  • 4.1.0
Returns:
Type: 
string | undefined

parameter() → {string|undefined}#

Returns the parameter name of the condition, if defined

Since
  • 4.1.0
Returns:
Type: 
string | undefined

query() → {$k.StructuredQuery|undefined}#

Version
  • Experimental feature, might be removed at any time
Since
  • 5.4.2
Returns:

The source query

Type: 
$k.StructuredQuery | undefined

setDefaultValue(value)#

Sets the default value. The default is used if no parameter for this condition is supplied

Parameters:
NameTypeDescription
value
Since
  • 4.1.0
Throws:

If the query condition is not modifiable

Type
$k.exception.QueryError

setIgnoreCase(ignoreCase)#

Set to true if equality should be insensitive

Parameters:
NameTypeDescription
ignoreCaseboolean
Since
  • 4.1.0
Throws:

If the query condition is not modifiable

Type
$k.exception.QueryError

setOperator(operator)#

Sets the comparison operator

Parameters:
NameTypeDescription
operatorstring

One of: "containsPhrase", "covers", "distance", "equal" (or "=="), "equalBy", "equalCardinality", "equalGeo", "equalMaxCardinality", "equalMinCardinality", "equalPresentTime", "equalsTopicOneWay", "fulltext", "greater" (or ">"), "greaterOrEqual" (or ">="), "greaterOverlaps", "greaterPresentTime", "isCoveredBy", "less" (or "<"), "lessOrEqual" (or "<="), "lessOverlaps", "lessPresentTime", "notEqual" (or "!="), "overlaps", "range", "regexEqual", "regexFulltext", "unmodifiedEqual", "words"

Since
  • 4.1.0
Throws:

If the query condition is not modifiable

Type
$k.exception.QueryError

setParameter(parameter)#

Sets the parameter name of the condition

Parameters:
NameTypeDescription
parameterstring
Since
  • 4.1.0
Throws:

If the condition cannot be modified

Type
$k.exception.QueryError