<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CloudKitJS",
  "identifier" : "/documentation/CloudKitJS/CloudKit.QueryFilterComparator",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "CloudKit JS"
    ],
    "preciseIdentifier" : "enum/CloudKit.QueryFilterComparator"
  },
  "title" : "CloudKit.QueryFilterComparator"
}
-->

# CloudKit.QueryFilterComparator

The comparators you use to create queries.

```
interface CloudKit.QueryFilterComparator {
	const String EQUALS;
	const String NOT_EQUALS;
	const String LESS_THAN;
	const String LESS_THAN_OR_EQUALS;
	const String GREATER_THAN;
	const String GREATER_THAN_OR_EQUALS;
	const String NEAR;
	const String CONTAINS_ALL_TOKENS;
	const String IN;
	const String NOT_IN;
	const String CONTAINS_ANY_TOKENS;
	const String LIST_CONTAINS;
	const String LIST_CONTAINS_ANY;
	const String NOT_LIST_CONTAINS;
	const String NOT_LIST_CONTAINS_ANY;
	const String BEGINS_WITH;
	const String NOT_BEGINS_WITH;
	const String LIST_MEMBER_BEGINS_WITH;
	const String NOT_LIST_MEMBER_BEGINS_WITH;
	const String LIST_CONTAINS_ALL;
	const String NOT_LIST_CONTAINS_ALL;
};
```

## Topics

### Enumeration Cases

[`const String BEGINS_WITH;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/BEGINS_WITH)

Finds records with a string field that begins with a substring.

[`const String CONTAINS_ALL_TOKENS;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/CONTAINS_ALL_TOKENS)

Finds records with text fields containing all tokens.

[`const String CONTAINS_ANY_TOKENS;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/CONTAINS_ANY_TOKENS)

Finds records with text fields containing any token.

[`const String EQUALS;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/EQUALS)

The value on the left is equal to the value on the right.

[`const String GREATER_THAN;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/GREATER_THAN)

The value on the left is greater than the value on the right.

[`const String GREATER_THAN_OR_EQUALS;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/GREATER_THAN_OR_EQUALS)

The value on the left is greater than or equal to the value on the right.

[`const String IN;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/IN)

The value on the left is in the list on the right.

[`const String LESS_THAN;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/LESS_THAN)

The value on the left is less than the value on the right.

[`const String LESS_THAN_OR_EQUALS;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/LESS_THAN_OR_EQUALS)

The value on the left is less than or equal to the value on the right.

[`const String LIST_CONTAINS;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/LIST_CONTAINS)

Finds records containing values in its list field.

[`const String LIST_CONTAINS_ALL;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/LIST_CONTAINS_ALL)

Finds records containing all values in its list field.

[`const String LIST_CONTAINS_ANY;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/LIST_CONTAINS_ANY)

Finds records that contain any of the values in its list field.

[`const String LIST_MEMBER_BEGINS_WITH;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/LIST_MEMBER_BEGINS_WITH)

Finds records containing a value as the first item in its list field.

[`const String NEAR;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/NEAR)

The location on the left is within the specified distance of the location on the right.

[`const String NOT_BEGINS_WITH;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/NOT_BEGINS_WITH)

Finds records with a string field that doesn’t begin with a substring.

[`const String NOT_EQUALS;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/NOT_EQUALS)

The value on the left is not equal to the value on the right.

[`const String NOT_IN;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/NOT_IN)

The value on the left is not in the list on the right.

[`const String NOT_LIST_CONTAINS;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/NOT_LIST_CONTAINS)

Finds records not containing values not in its list field.

[`const String NOT_LIST_CONTAINS_ALL;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/NOT_LIST_CONTAINS_ALL)

Finds records not containing all values in its list field.

[`const String NOT_LIST_CONTAINS_ANY;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/NOT_LIST_CONTAINS_ANY)

Finds records not containing any of the values in its list field.

[`const String NOT_LIST_MEMBER_BEGINS_WITH;`](/documentation/CloudKitJS/CloudKit.QueryFilterComparator/NOT_LIST_MEMBER_BEGINS_WITH)

Finds records not containing a value as the first item in its list field.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)