Documentation: remove warnings about Database extraction out of DatabaseQueue, since Database will vigorously crash as soon as it is badly used.

This commit is contained in:
Gwendal Roué committed 2015-09-13 17:37:02 +02:00
1 parent f61ef5618a
commit 15600b7268
1 file changed
-31
-31
View File
@@ -70,16 +70,6 @@ public final class DatabaseQueue {
This method is *not* reentrant.
**Warning**: The *db* parameter of the block should not be used outside of
the block. Do not extract it, and do not store it in another object that
lives longer than the block:
var database: Database?
dbQueue.inDatabase { db in
database = db
}
database!.fetch(...) // NOT OK
- parameter block: A block that accesses the database.
- throws: The error thrown by the block.
*/
@@ -98,17 +88,6 @@ public final class DatabaseQueue {
This method is *not* reentrant.
**Warning**: The *db* parameter of the block should not be used outside of
the block. Do not extract it, and do not store it in another object that
lives longer than the block:
var database: Database?
let rows = dbQueue.inDatabase { db in
database = db
return db.fetch(...)
}
database!.fetch(...) // NOT OK
- parameter block: A block that accesses the database.
- throws: The error thrown by the block.
*/
@@ -132,16 +111,6 @@ public final class DatabaseQueue {
This method is *not* reentrant.
**Warning**: The *db* parameter of the block should not be used outside of
the transaction block. Do not extract it, and do not store it in another
object that lives longer than the block:
var database: Database?
try dbQueue.inTransaction { db in
database = db
}
database!.fetch(...) // NOT OK
- parameter type: The transaction type (default nil). If nil, the
transaction type is configuration.transactionType, which itself defaults
to .Exclusive. See https://www.sqlite.org/lang_transaction.html for more