beginsWith method

QueryPredicateOperation beginsWith(
  1. String value
)

A beginsWith operation.

Matches models where the given field begins with the provided value.

Example:

The example returns Posts where the title begins with "foo".

Amplify.DataStore.query(
 Post.classType,
 where: Post.TITLE.beginsWith("foo"),
);

Implementation

QueryPredicateOperation beginsWith(String value) =>
    QueryPredicateOperation(fieldName, BeginsWithQueryOperator(value));