Creates a copy of self.
Not used. Present only to fulfill the UntypedCondition interface.
A new, identitical FieldCondition.
Not implemented. Not needed. GroupCondition instead consumes FieldConditions and transforms them into legacy predicates. (For now.)
N/A. If ever implemented, the storage adapter to query.
N/A. If ever implemented, return items from storage that match.
Produces a new condition (FieldCondition or GroupCondition) that
matches the opposite of this condition.
Intended to be used when applying De Morgan's Law, which can be done to produce more efficient queries against the storage layer if a negation appears in the query tree.
For example:
name.eq('robert') becomes name.ne('robert')price.between(100, 200) becomes m => m.or(m => [m.price.lt(100), m.price.gt(200)])The model meta to use when construction a new GroupCondition
for cases where the negation requires multiple FieldCondition's.
Produces a tree structure similar to a graphql condition. The returned structure is "dumb" and is intended for another query/condition generation mechanism to interpret, such as the cloud or storage query builders.
E.g.,
{
"name": {
"eq": "robert"
}
}
Checks this.operands for compatibility with this.operator.
A condition that can operate against a single "primitive" field of a model or item.
field The field of some record to test against.
operator The equality or comparison operator to use.
operands The operands for the equality/comparison check.