DataStoreCategory
public final class DataStoreCategory : Category
extension DataStoreCategory: DataStoreBaseBehavior
extension DataStoreCategory: DefaultLogger
extension DataStoreCategory: Resettable
extension DataStoreCategory: DataStoreSubscribeBehavior
-
Always .dataStore
Declaration
Swift
public let categoryType: CategoryType
-
Adds
pluginto the list of Plugins that implement functionality for this category.Declaration
Swift
public func add(plugin: DataStoreCategoryPlugin) throwsParameters
pluginThe Plugin to add
-
Returns the added plugin with the specified
keyproperty.Declaration
Swift
public func getPlugin(for key: PluginKey) throws -> DataStoreCategoryPluginParameters
keyThe PluginKey (String) of the plugin to retrieve
Return Value
The wrapped plugin
-
Removes the plugin registered for
keyfrom the list of Plugins that implement functionality for this category. If no plugin has been added forkey, no action is taken, making this method safe to call multiple times.Declaration
Swift
public func removePlugin(for key: PluginKey)Parameters
keyThe key used to
addthe plugin -
save(_:Asynchronouswhere: ) Declaration
Swift
@discardableResult public func save<M: Model>( _ model: M, where condition: QueryPredicate? = nil ) async throws -> M -
query(_:AsynchronousbyId: ) Declaration
Swift
public func query<M: Model>( _ modelType: M.Type, byId id: String ) async throws -> M? -
query(_:AsynchronousbyIdentifier: ) Declaration
Swift
public func query<M: Model>( _ modelType: M.Type, byIdentifier id: String ) async throws -> M? where M: ModelIdentifiable, M.IdentifierFormat == ModelIdentifierFormat.Default -
query(_:AsynchronousbyIdentifier: ) Declaration
Swift
public func query<M: Model>( _ modelType: M.Type, byIdentifier identifier: ModelIdentifier<M, M.IdentifierFormat> ) async throws -> M? where M: ModelIdentifiable -
query(_:Asynchronouswhere: sort: paginate: ) Declaration
Swift
public func query<M: Model>( _ modelType: M.Type, where predicate: QueryPredicate? = nil, sort sortInput: QuerySortInput? = nil, paginate paginationInput: QueryPaginationInput? = nil ) async throws -> [M] -
delete(_:Asynchronouswhere: ) Declaration
Swift
public func delete( _ model: some Model, where predicate: QueryPredicate? = nil ) async throws -
delete(_:AsynchronouswithId: where: ) Declaration
Swift
public func delete( _ modelType: (some Model).Type, withId id: String, where predicate: QueryPredicate? = nil ) async throws -
delete(_:AsynchronouswithIdentifier: where: ) Declaration
Swift
public func delete<M: Model>( _ modelType: M.Type, withIdentifier id: String, where predicate: QueryPredicate? = nil ) async throws where M: ModelIdentifiable, M.IdentifierFormat == ModelIdentifierFormat.Default -
delete(_:AsynchronouswithIdentifier: where: ) Declaration
Swift
public func delete<M: Model>( _ modelType: M.Type, withIdentifier id: ModelIdentifier<M, M.IdentifierFormat>, where predicate: QueryPredicate? = nil ) async throws where M: ModelIdentifiable -
delete(_:Asynchronouswhere: ) Declaration
Swift
public func delete( _ modelType: (some Model).Type, where predicate: QueryPredicate ) async throws -
start()AsynchronousDeclaration
Swift
public func start() async throws -
stop()AsynchronousDeclaration
Swift
public func stop() async throws -
clear()AsynchronousDeclaration
Swift
public func clear() async throws -
Declaration
Swift
public static var log: Logger { get } -
Declaration
Swift
public var log: Logger { get } -
reset()AsynchronousDeclaration
Swift
public func reset() async -
Declaration
Swift
public func observe(_ modelType: (some Model).Type) -> AmplifyAsyncThrowingSequence<MutationEvent> -
Declaration
Swift
public func observeQuery<M: Model>( for modelType: M.Type, where predicate: QueryPredicate? = nil, sort sortInput: QuerySortInput? = nil ) -> AmplifyAsyncThrowingSequence<DataStoreQuerySnapshot<M>>
View on GitHub