Contents

DataStore

An interface that enables SwiftData to read and write model data without knowledge of the underlying storage mechanism.

Declaration

protocol DataStore : AnyObject

Topics

Creating a data store

Accessing store information

Processing fetch requests

Persisting model data

Removing all persisted model data

Sharing cached data between model contexts

See Also

Model storage