A function that accepts a ModelPrecicate, which it must use to return a final condition.
This is used as predicates in DataStore.save(), DataStore.delete(), and DataStore sync expressions.
DataStore.save()
DataStore.delete()
DataStore.save(record, model => model.field.eq('some value')) Copy
DataStore.save(record, model => model.field.eq('some value'))
Logical operators are supported. But, condtiions are related records are NOT supported. E.g.,
DataStore.delete(record, model => model.or(m => [ m.field.eq('whatever'), m.field.eq('whatever else')])) Copy
DataStore.delete(record, model => model.or(m => [ m.field.eq('whatever'), m.field.eq('whatever else')]))
A function that accepts a ModelPrecicate, which it must use to return a
final condition.
This is used as predicates in
DataStore.save()
,DataStore.delete()
, and DataStore sync expressions.Logical operators are supported. But, condtiions are related records are NOT supported. E.g.,