Commit Graph
11244 Commits
Author SHA1 Message Date
Gwendal Roué 589e53b231 v6.0.0 2022-09-09 11:40:39 +02:00
Gwendal Roué 125f112fb7 CHANGELOG 2022-09-09 11:34:58 +02:00
Gwendal Roué c6aa323cd8 Skip flaky test 2022-09-09 09:50:25 +02:00
Gwendal Roué 1c7b618a89 Parallelizable tests 2022-09-09 09:33:57 +02:00
Gwendal Roué d3ad7acd59 No WALSnapshot on macOS and macOS Catalyst
Fix #1276
2022-09-09 08:16:55 +02:00
Gwendal Roué 82b4d90a82 Xcode 14 RC doesn't ship with the Swift 5.6 stdlib
https://forums.swift.org/t/xcode-14-rc-cannot-specialize-protocol-type/60171
2022-09-09 08:16:55 +02:00
Gwendal Roué 2a3318ef9a ALTER TABLE DROP COLUMN is properly reported with SQLITE_ALTER_TABLE for SQLite 3.38+ 2022-09-07 08:51:05 +02:00
Gwendal Roué f2c46784a6 ArrayRowImpl is checked Sendable 2022-09-07 08:50:32 +02:00
Gwendal Roué 9340fdc7c2 DatabaseValue.Storage is checked Sendable 2022-09-07 08:02:34 +02:00
Gwendal Roué b0f7493765 BREAKING: rename request methods that build a DatabasePromise
This creates an opportunity for future `request.filter { ... }` apis that look like standard ones. Why not `Player.filter { $0.score > 1000 }` eventually, perhaps with code generation?
2022-09-06 22:56:40 +02:00
Gwendal Roué 30234fde62 CHANGELOG 2022-09-06 08:54:29 +02:00
Gwendal Roué fdbcb07452 Fix #1275 2022-09-06 08:25:21 +02:00
Gwendal Roué dced16bdce Update SQLiteCustom to v3.39.3 2022-09-05 20:43:51 +02:00
Gwendal Roué 849be02906 Remove useless Xcode requirements in documentation
GRDB 6 requires Xcode 14+, Swift concurrency is always available.
2022-09-05 20:32:50 +02:00
Gwendal Roué b3f5b892a6 CHANGELOG 2022-09-05 08:46:05 +02:00
Gwendal Roué 65efc413fe Fix for failing test for #1274
https://github.com/groue/GRDB.swift/discussions/1274
2022-09-05 08:43:43 +02:00
Gwendal Roué f3b8b7221c Failing test for #1274
https://github.com/groue/GRDB.swift/discussions/1274
2022-09-05 08:42:29 +02:00
Gwendal Roué f04a02731d Add defaultLocalization to GRDB package
This solves the "manifest property 'defaultLocalization' not set; it is required in the presence of localized resources" error
2022-09-04 14:09:35 +02:00
Gwendal Roué 6add38e3e5 BREAKING: Allow ValueObservation to perform different kinds of fetch
We're interested in allowing observations to build values based on snapshots
2022-09-04 12:06:17 +02:00
Gwendal Roué 202b3e5620 Encapsulate ValueObservation database accesses
Also, enhance Database.isolated(readOnly:) by not creating a savepoint if the database is already inside a transaction.
2022-09-04 10:11:22 +02:00
Gwendal Roué 49cce0aa8a CHANGELOG 2022-08-29 14:22:04 +02:00
Gwendal Roué ccf3486827 CHANGELOG 2022-08-29 14:21:01 +02:00
Gwendal Roué cb93979a44 Update CONTRIBUTING.md
It needed to be updated for cross-platform targets
2022-08-28 14:52:31 +02:00
Gwendal Roué 628ac58535 Merge branch 'development' v6.0.0-beta.4 2022-08-28 13:45:17 +02:00
Gwendal Roué 373f95a6cb v6.0.0-beta.4 2022-08-28 13:44:35 +02:00
Gwendal Roué f2859ff8bf Use SQLITE_OPEN_EXRESCODE when available 2022-08-28 12:50:47 +02:00
Gwendal Roué e2b412afc8 Merge branch 'dev/TableInfo' into development 2022-08-28 12:49:59 +02:00
Gwendal Roué 040e5d9d87 WITHOUT ROWID check: prefer PRAGMA table_list when available
This avoids the undesired errors described in #945.
2022-08-28 12:28:39 +02:00
Gwendal Roué 189430c1fe PRAGMA table_list 2022-08-28 12:28:39 +02:00
Gwendal Roué 3d77a8da86 Update the manual installation documentation 2022-08-28 09:59:52 +02:00
Gwendal Roué c40256600a Update playgrounds doc 2022-08-28 09:49:34 +02:00
Gwendal Roué b617f432c0 Merge branch 'dev/cross-platform-targets' into development 2022-08-27 14:43:33 +02:00
Gwendal Roué 72ef13f4fb CHANGELOG 2022-08-27 14:43:06 +02:00
Gwendal Roué 535f44c463 Update the GRDB6 migration guide 2022-08-27 14:42:57 +02:00
Gwendal Roué 4c10899a3c Single Cross-Platform Target 2022-08-27 13:43:44 +02:00
Gwendal Roué 524ee1d098 Merge pull request #1271 from groue/dev/SQLite-3.39.2
Bump custom SQLite builds v3.39.2
2022-08-27 12:27:56 +02:00
Gwendal Roué 973b679baa CHANGELOG 2022-08-27 12:27:14 +02:00
Gwendal Roué 0321c79c2d Update SQLiteCustom to v3.39.2 2022-08-27 12:16:59 +02:00
Gwendal Roué e82a03615f Merge branch 'development' v6.0.0-beta.3 2022-08-25 19:11:29 +02:00
Gwendal Roué 51c9071b3d v6.0.0-beta.3 2022-08-25 19:11:20 +02:00
Gwendal Roué 91e5f838d3 Merge branch 'dev/GRDB6-singleton-record' into development 2022-08-25 19:10:09 +02:00
Gwendal Roué d026232cbf CHANGELOG 2022-08-25 19:09:51 +02:00
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
Gwendal Roué 05b81df614 Update the migration guide with the actions to perform on customized records 2022-08-25 19:05:27 +02:00
Gwendal Roué 3e4b04d4d1 Test the "Single-Row Tables" guide 2022-08-25 19:05:27 +02:00
Gwendal Roué 56cdaabd9c Update the "Single-Row Tables" guide 2022-08-25 19:05:27 +02:00
Gwendal Roué c65a19c50f Merge pull request #1268 from groue/dev/issue-1267
Fix SQL generation of CHECK constraints.
2022-08-25 08:31:53 +02:00
Gwendal Roué 5247a1537c CHANGELOG 2022-08-25 08:31:20 +02:00
Gwendal Roué 58f970701f BREAKING: Fix failing test for #1267
The regression was probably due to a bad interaction between Implicitly Opened Existentials (SE-0352) and Opaque Parameter Declarations (SE-0341) which GRDB 6 now uses in a lot of places.

Considering the sample code below:

    try db.create(table: ...) { t in
      t.column(...).check { $0 != Column(...) }
    }

- The `check` method accepts a closure that returns `any SQLExpressible` (the same as GRDB 5)
- The `!=` SQL comparison operator is `(some SQLSpecificExpressible, some SQLSpecificExpressible) -> SQLExpression`, when it was `(SQLSpecificExpressible, SQLSpecificExpressible) -> SQLExpression` in GRDB 5

The compiler has started preferring interpreting the != operator as Column's Equatable implementation, instead of the `!=` SQL comparison operator

We force the compiler to use the SQL comparison operator by removing the Equatable conformance from Column. It was introduced in a70b42c, as a support for a feature that has been removed since then.

This is a breaking change, but this also is an improvement. Now `column1 != column2` has a single meaning, and the library is less prone to similar regressions in the future.
2022-08-25 08:26:37 +02:00
Gwendal Roué 980f5247f0 Failing test for #1267 2022-08-25 08:12:32 +02:00