mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
DatabasePool setup: handle #102 in a savepoint
This commit is contained in:
1 parent
c89d41adbb
commit
ff21f86341
1 file changed
+7
-4
@@ -102,10 +102,13 @@ public final class DatabasePool: DatabaseWriter {
|
||||
// opens a pool to an existing non-WAL database, and
|
||||
// attempts to read from it.
|
||||
// See https://github.com/groue/GRDB.swift/issues/102
|
||||
try db.execute(sql: """
|
||||
CREATE TABLE grdb_issue_102 (id INTEGER PRIMARY KEY);
|
||||
DROP TABLE grdb_issue_102;
|
||||
""")
|
||||
try db.inSavepoint {
|
||||
try db.execute(sql: """
|
||||
CREATE TABLE grdb_issue_102 (id INTEGER PRIMARY KEY);
|
||||
DROP TABLE grdb_issue_102;
|
||||
""")
|
||||
return .commit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user