function
Exists
Match documents that have a value for a field, or that have none.
Example
query.Exists("image", true)Arguments
| Argument | Type | Description |
|---|---|---|
path | P | The field, as a dot-separated name such as "seo.title" or a Path. |
exists | bool | true matches documents with a value; false matches documents without one. |
Returns
The comparison.
ExpressionFull signature
func Exists[P FieldPath](
path P,
exists bool,
) ExpressionRelated types
FieldPathA field name in a filter or sort: a string such as "seo.title", or a Path.
ExpressionA sealed immutable predicate consumed atomically by stores.