le method

A less than or equal to operation.

Matches models where the given field is less than or equal to the provided value.

Examples:

Both examples return Posts where the rating is less than or equal to 10.

Example with .le() method:

Amplify.DataStore.query(
 Post.classType,
 where: Post.RATING.le(10),
);

Example with <= operator:

Amplify.DataStore.query(
 Post.classType,
 where: Post.RATING <= 10,
);

Implementation

QueryPredicateOperation le(Comparable<T> value) => QueryPredicateOperation(
      fieldName,
      LessOrEqualQueryOperator<Comparable<T>>(value),
    );