A function that accepts a RecursiveModelPrecicate, which it must use to return a final condition.
This is used in DataStore.query(), DataStore.observe(), and DataStore.observeQuery() as the second argument. E.g.,
DataStore.query()
DataStore.observe()
DataStore.observeQuery()
DataStore.query(MyModel, model => model.field.eq('some value')) Copy
DataStore.query(MyModel, model => model.field.eq('some value'))
More complex queries should also be supported. E.g.,
DataStore.query(MyModel, model => model.and(m => [ m.relatedEntity.or(relative => [ relative.relativeField.eq('whatever'), relative.relativeField.eq('whatever else') ]), m.myModelField.ne('something')])) Copy
DataStore.query(MyModel, model => model.and(m => [ m.relatedEntity.or(relative => [ relative.relativeField.eq('whatever'), relative.relativeField.eq('whatever else') ]), m.myModelField.ne('something')]))
A function that accepts a RecursiveModelPrecicate, which it must use to
return a final condition.
This is used in
DataStore.query()
,DataStore.observe()
, andDataStore.observeQuery()
as the second argument. E.g.,More complex queries should also be supported. E.g.,