mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
Remove useless warnings in the documentation of DatabaseReader.backup(to:)
GRBD serializes uses of writer connections: it’s useless to warn the user against using a database during a backup.
This commit is contained in:
1 parent
88fe1cae08
commit
92538de969
2 files changed
-15
No files matched your search
@@ -120,15 +120,6 @@ extension DatabaseReader {
|
||||
/// When the source is a DatabasePool, concurrent writes can happen during
|
||||
/// the backup. Those writes may, or may not, be reflected in the backup,
|
||||
/// but they won't trigger any error.
|
||||
///
|
||||
/// Conversely, the destination database **must not** be used during the
|
||||
/// backup. Quoting https://www.sqlite.org/c3ref/backup_finish.html:
|
||||
///
|
||||
/// > SQLite does not currently check to see if the application incorrectly
|
||||
/// > accesses the destination database connection and so no error code is
|
||||
/// > reported, but the operations may malfunction nevertheless. Use of the
|
||||
/// > destination database connection while a backup is in progress might
|
||||
/// > also also cause a mutex deadlock.
|
||||
public func backup(to writer: DatabaseWriter) throws {
|
||||
try backup(to: writer, afterBackupInit: nil, afterBackupStep: nil)
|
||||
}
|
||||
|
||||
@@ -2577,12 +2577,6 @@ The `backup` method blocks the current thread until the destination database con
|
||||
|
||||
When the source is a [database pool](#database-pools), concurrent writes can happen during the backup. Those writes may, or may not, be reflected in the backup, but they won't trigger any error.
|
||||
|
||||
Conversely, the destination database **must not** be used during the backup. Quoting [SQLite documentation](https://www.sqlite.org/c3ref/backup_finish.html):
|
||||
|
||||
> SQLite does not currently check to see if the application incorrectly accesses the destination database connection and so no error code is reported, but the operations may malfunction nevertheless. Use of the destination database connection while a backup is in progress might also also cause a mutex deadlock.
|
||||
|
||||
For a detailed discussion, see https://www.sqlite.org/c3ref/backup_finish.html.
|
||||
|
||||
|
||||
Good To Know
|
||||
============
|
||||
|
||||
Reference in new issue
Block a user