Add database change notification

This commit is contained in:
2025-11-09 17:23:08 +02:00
parent 5bbb722b20
commit df17d21ec4
6 changed files with 84 additions and 112 deletions

View File

@@ -77,14 +77,14 @@ open class ModelDatabaseService: DatabaseService, @unchecked Sendable {
/// - provider: A closure that returns a new database connection.
/// - config: Optional configuration for the connection.
/// - queue: The dispatch queue used for serializing database operations.
/// - center: The notification center used for database events. Defaults to `.database`.
/// - center: The notification center used for database events. Defaults to `.databaseCenter`.
/// - encoder: The encoder for converting models into SQLite rows.
/// - decoder: The decoder for converting rows back into model instances.
public init(
provider: @escaping ConnectionProvider,
config: ConnectionConfig? = nil,
queue: DispatchQueue? = nil,
center: NotificationCenter = .database,
center: NotificationCenter = .databaseCenter,
encoder: RowEncoder,
decoder: RowDecoder
) {