Files
GRDB.swift/Tests/GRDBTests
Gwendal Roué c2e4aaf51d Throw SQLITE_MISUSE in case of programmer error in the aroundXxx callbacks
While writing SingletonRecordTest.swift, I tried the solution below, in order to turn a failed update into an insert:

    func aroundUpdate(_ db: Database, columns: Set<String>, update: () throws -> PersistenceSuccess) throws {
        do {
            _ = try update()
        } catch {
            insert(db)
        }
    }

But this can't work. This `insert(db)` is unable to provide the information we need in `update()`: the result of the eventual RETURNING clause, and the PersistenceSuccess that contains the persisted PersistenceContainer.

So we now detect two misuses: 1) not calling the action method, and 2) not rethrowing the error of the action method.
2022-08-25 19:05:27 +02:00
..
2020-09-06 13:57:16 +02:00
2020-09-06 13:57:16 +02:00
2020-09-06 13:57:16 +02:00
2020-09-06 13:57:16 +02:00
2022-01-19 00:10:42 +08:00
2020-09-06 13:57:16 +02:00
2022-01-23 12:24:34 +01:00
2022-08-21 21:22:34 +02:00
2022-08-21 21:22:34 +02:00
2019-05-19 13:55:38 +02:00
2020-07-19 09:54:39 +02:00
2021-03-21 13:33:49 +01:00
2022-01-19 00:10:42 +08:00