DataStoreSubscribeBehavior
public protocol DataStoreSubscribeBehavior
-
Returns an AmplifyAsyncThrowingSequence for model changes (create, updates, delete)
Declaration
Swift
func observe(_ modelType: (some Model).Type) -> AmplifyAsyncThrowingSequence<MutationEvent>Parameters
modelTypeThe model type to observe
-
Returns a Publisher for query snapshots.
Declaration
Swift
func observeQuery<M: Model>( for modelType: M.Type, where predicate: QueryPredicate?, sort sortInput: QuerySortInput? ) -> AmplifyAsyncThrowingSequence<DataStoreQuerySnapshot<M>>Parameters
modelTypeThe model type to observe
predicateThe predicate to match for filtered results
sortInputThe field and order of data to be returned
View on GitHub