SwiftprotocolSwiftData
protocol SwiftData.DataStore
Members 20
- associatedtype
associatedtype Configuration - associatedtype
associatedtype Snapshot - func
method descriptor for cachedSnapshots(for: [SwiftData.PersistentIdentifier], editingState: SwiftData.EditingState) throws -> [SwiftData.PersistentIdentifier : A.Snapshot] - func
cachedSnapshots(for: [SwiftData.PersistentIdentifier], editingState: SwiftData.EditingState) throws -> [SwiftData.PersistentIdentifier : A.Snapshot] - func
method descriptor for erase() throws -> () - func
erase() throws -> () - func
method descriptor for fetch<A where A1: SwiftData.PersistentModel>(SwiftData.DataStoreFetchRequest<A1>) throws -> SwiftData.DataStoreFetchResult<A1, A.Snapshot> - func
method descriptor for fetchCount<A where A1: SwiftData.PersistentModel>(SwiftData.DataStoreFetchRequest<A1>) throws -> Int - func
fetchCount<A where A1: SwiftData.PersistentModel>(SwiftData.DataStoreFetchRequest<A1>) throws -> Int - func
method descriptor for fetchIdentifiers<A where A1: SwiftData.PersistentModel>(SwiftData.DataStoreFetchRequest<A1>) throws -> [SwiftData.PersistentIdentifier] - func
fetchIdentifiers<A where A1: SwiftData.PersistentModel>(SwiftData.DataStoreFetchRequest<A1>) throws -> [SwiftData.PersistentIdentifier] - func
method descriptor for initializeState(for: SwiftData.EditingState) -> () - func
initializeState(for: SwiftData.EditingState) -> () - func
method descriptor for invalidateState(for: SwiftData.EditingState) -> () - func
invalidateState(for: SwiftData.EditingState) -> () - func
method descriptor for save(SwiftData.DataStoreSaveChangesRequest<A.Snapshot>) throws -> SwiftData.DataStoreSaveChangesResult<A.Snapshot> - init
method descriptor for init(_: A.Configuration, migrationPlan: SwiftData.SchemaMigrationPlan.Type?) throws -> A - var
var configuration: A.Configuration { get } - var
var identifier: String { get } - var
var schema: SwiftData.Schema { get }
Header
protocol DataStore: AnyObject where Self == Self.Configuration.Store, Self.Configuration: SwiftData.DataStoreConfiguration, Self.Snapshot: SwiftData.DataStoreSnapshot { associatedtype Configuration associatedtype Snapshot init(_: Self.Configuration, migrationPlan: (any SwiftData.SchemaMigrationPlan.Type)?) throws var configuration: Self.Configuration { get } var identifier: Swift.String { get } var schema: SwiftData.Schema { get } func erase() throws func fetch<A1>(_: SwiftData.DataStoreFetchRequest<A1>) throws -> SwiftData.DataStoreFetchResult<A1, Self.Snapshot> where A1: SwiftData.PersistentModel func fetchCount<A1>(_: SwiftData.DataStoreFetchRequest<A1>) throws -> Swift.Int where A1: SwiftData.PersistentModel func fetchIdentifiers<A1>(_: SwiftData.DataStoreFetchRequest<A1>) throws -> [SwiftData.PersistentIdentifier] where A1: SwiftData.PersistentModel func save(_: SwiftData.DataStoreSaveChangesRequest<Self.Snapshot>) throws -> SwiftData.DataStoreSaveChangesResult<Self.Snapshot> func initializeState(for: SwiftData.EditingState) func invalidateState(for: SwiftData.EditingState) func cachedSnapshots(for: [SwiftData.PersistentIdentifier], editingState: SwiftData.EditingState) throws -> [SwiftData.PersistentIdentifier : Self.Snapshot] } extension SwiftData.DataStore { func fetchCount<A1>(_: SwiftData.DataStoreFetchRequest<A1>) throws -> Swift.Int where A1: SwiftData.PersistentModel func cachedSnapshots(for: [SwiftData.PersistentIdentifier], editingState: SwiftData.EditingState) throws -> [SwiftData.PersistentIdentifier : Self.Snapshot] func initializeState(for: SwiftData.EditingState) func invalidateState(for: SwiftData.EditingState) func fetchIdentifiers<A1>(_: SwiftData.DataStoreFetchRequest<A1>) throws -> [SwiftData.PersistentIdentifier] where A1: SwiftData.PersistentModel func erase() throws }