Predicate
Index
Constructors
Methods
Constructors
constructor
Returns Predicate
Methods
staticand
staticcontains
Create a predicate matching a specified string property to a specified string.
Parameters
property: Property<string>
the string property to use for filtering
value: string
the value the string property must match
optionalcaseSensitive: boolean
if the match must pay attention to case sensitivity, default value is true
Returns Predicate
new Predicate with the contains string operation
staticequals
staticgreaterThan
Create a predicate matching a specified number property to a numerical lower bound
Parameters
property: Property<number>
the number property to user for filtering
value: number
the lower bound
optionalstrict: boolean
if the inequality is strict or not
Returns Predicate
new Predicate with the greaterThan mathematical operation
staticin
Create a predicate to match the specified object(s).
Parameters
rest...tags: InstanceOrTag[]
the object or unique identifier (tag) of the objects to look for.
Returns Predicate
staticinstanceOf
Create a predicate matching the expected model. If extend=true, the predicate will match against inherited models as well
Parameters
expectedModel: InstanceOrTag
the expected model
extend: boolean
should the predicate also match against inherited models
Returns Predicate
new Predicate
staticnot
staticor
staticregex
Create a predicate matching a specified string property to a regular expression.
Parameters
property: Property<string>
the string property to use for filtering
value: string | RegExp
the regex or pattern the string property must match
optionalcaseSensitive: boolean
if the match must pay attention to case sensitivity, default value is true
Returns Predicate
new Predicate with the match regex operation
staticsmallerThan
Create a predicate matching a specified number property to a numerical upper bound
Parameters
property: Property<number>
the number property to user for filtering
value: number
the upper bound
optionalstrict: boolean
if the inequality is strict or not
Returns Predicate
new Predicate with the smallerThan mathematical operation
Predicates are used to filter queries.
Example: