Commit Graph
10008 Commits
Author SHA1 Message Date
Gwendal Roué fb6ea57d74 Don’t setup database observation in read-only connections.
Observation of read-only connections has turned useless since read-only transactions are no longer reported to TransactionObserver, in #1213
2022-08-21 21:22:34 +02:00
Gwendal Roué 0879311646 Make TransactionObserver.swift easier to read
Add some documentation, and rename some types and variables.
2022-08-21 21:22:34 +02:00
Gwendal Roué 2f2cccacf9 Remove UI tests of demo apps, since GRDBQuery is tested on its own
(Don't test the framework)
2022-08-21 21:22:34 +02:00
Gwendal Roué e5d10ed8c1 fix async AppDatabaseTests tests 2022-08-21 21:22:34 +02:00
Gwendal Roué 070ee2c796 Makefile: disable -warn-concurrency and -enable-actor-data-race-checks
This creates issues with Xcode 14 beta 4
2022-08-21 21:22:34 +02:00
Gwendal Roué 9a9406a69d SE-0353: Constrained Existential Types
https://github.com/apple/swift-evolution/blob/main/proposals/0353-constrained-existential-types.md
2022-08-21 21:22:34 +02:00
Gwendal Roué b2eafd4a13 SE-0361: Extensions on bound generic types
https://github.com/apple/swift-evolution/blob/main/proposals/0361-bound-generic-extensions.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 36892fee55 BREAKING: Bump minimum SQLite version to 3.19.3 2022-08-21 21:22:34 +02:00
Gwendal Roué 49a66e197b Foster some FetchRequest<...> in the documentation 2022-08-21 21:22:34 +02:00
Gwendal Roué 80ec31f588 BREAKING: remove DerivableRequest.limit(_:offset:) 2022-08-21 21:22:34 +02:00
Gwendal Roué c26ed6c280 NEW: throw decoding errors 2022-08-21 21:22:34 +02:00
Gwendal Roué eb98541923 Documentation 2022-08-21 21:22:34 +02:00
Gwendal Roué 895964de16 BREAKING: Throwing FetchableRecord.init(row:) 2022-08-21 21:22:34 +02:00
Gwendal Roué 927fc21f00 NEW: ValueObservation.map accepts a throwing closure
This will allow us to call a throwing FetchableRecord.init(row:) from this operator
2022-08-21 21:22:34 +02:00
Gwendal Roué a15f731042 BREAKING: remove Record.copy()
This will allow FetchableRecord.init(row:) to throw
2022-08-21 21:22:34 +02:00
Gwendal Roué 3000cd3c7f TODO 2022-08-21 21:22:34 +02:00
Gwendal Roué 2011776cbe Remove misleading comments 2022-08-21 21:22:34 +02:00
Gwendal Roué 33a039717c Refer to UIApplication notifications by their names
It looks like FB9801372 was fixed
2022-08-21 21:22:34 +02:00
Gwendal Roué a20d543bcf Swiftlint: disable the for_where rule 2022-08-21 21:22:34 +02:00
Gwendal Roué 55445dcc7c NEW: RangeReplaceableCollection.append(contentsOf: cursor) 2022-08-21 21:22:34 +02:00
Gwendal Roué 34a4fa6444 TODO 2022-08-21 21:22:34 +02:00
Gwendal Roué dba7f1b2dc BREAKING: turn Cursor.isEmpty into a property
https://github.com/apple/swift-evolution/blob/main/proposals/0310-effectful-readonly-properties.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 180c8975ac Stop using #filePath 2022-08-21 21:22:34 +02:00
Gwendal Roué 11a6d53d8a SE-0326: closure result type inference
https://github.com/apple/swift-evolution/blob/main/proposals/0326-extending-multi-statement-closure-inference.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 42987dd849 Cleanup filter(rawKeys:) 2022-08-21 21:22:34 +02:00
Gwendal Roué 7ffc332327 BREAKING: replace selectID() with selectPrimaryKey(as:)
Since Optional is a database value like others, selectID would be a request of optionals for records with an optional ID type:

    struct Player: Identifiable, MutablePersistableRecord {
        var id: Int64?
    }

    Player.selectID() // QueryInterface<Int64?>

This is not good, because primary keys are not null. And those requests would fetch impractical types such as [Int64?], Set<Int64?>, Int64??.

Instead, we introduce selectPrimaryKey(as:), which allows the user to provide the desired type.

    Player.selectPrimaryKey(as: Int64.self) // QueryInterface<Int64>
2022-08-21 21:22:34 +02:00
Gwendal Roué a9fcf1b9c1 SE-0335, SE-0341, SE-0346, SE-0352, SE-0358: some, any, primary associated types 2022-08-21 21:22:34 +02:00
Gwendal Roué c0c6b34869 SE-0346: primary associated types 2022-08-21 21:22:34 +02:00
Gwendal Roué dd55175978 SE-0345: if let x { }
https://github.com/apple/swift-evolution/blob/main/proposals/0345-if-let-shorthand.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 58293befc9 BREAKING: Optional is a database value like others 2022-08-21 21:22:34 +02:00
Gwendal Roué 458e1e2675 BREAKING: throwing DatabaseQueue() initializer
As a consequence, FTS3.tokenize(_:) is a throwing method as well.
2022-08-21 21:22:33 +02:00
Gwendal Roué 6f0d45eedb BREAKING: throwing DatabaseWriter.barrierWriteWithoutTransaction
It used to be rethrowing, but it was then unable to deal with closed databases.

The async version is modified accordingly: it accepts a Result<Database, Error>, instead of a raw Database.

DatabaseMigrator.asyncMigrate is impacted as well: it accepts a Result<Database, Error>, instead of a (Database, Error?) tuple.
2022-08-21 19:21:57 +02:00
Gwendal Roué fe225fe452 BREAKING: Remove deprecated methods 2022-08-21 19:21:57 +02:00
Gwendal Roué 78b9c543a3 Swift 5.7 required: SPM testing convenience
Make it possible to test SQLITE_ENABLE_FTS5 and SQLITE_ENABLE_PREUPDATE_HOOK with `make test_SPM`.

This is very handy because Xcode 14 beta 3 has difficulties testing GRDBCustom.
2022-08-21 19:21:57 +02:00
Gwendal Roué 86de843bda Swift 5.7 required: Xcode 14 updates 2022-08-21 19:21:57 +02:00
Gwendal Roué 20dcab75c7 Swift 5.7 required: SPM resources 2022-08-21 19:21:57 +02:00
Gwendal Roué 23cbf13af0 Swift 5.7 required: Availability checks 2022-08-21 19:21:57 +02:00
Gwendal Roué 6da7d47394 Swift 5.7 required: Remove compiler checks 2022-08-21 19:21:57 +02:00
Gwendal Roué fcb037bdf0 Swift 5.7 required: Bump deployment targets 2022-08-21 19:21:57 +02:00
Gwendal Roué df0ae43c5f Swift 5.7 required: Sendable 2022-08-21 19:21:26 +02:00
Gwendal Roué fc59b45493 Swift 5.7 required: Package.swift 2022-08-21 19:21:26 +02:00
Gwendal Roué a22113faa5 Swift 5.7 required: podspec 2022-08-21 19:21:26 +02:00
Gwendal Roué d1a32d1950 Swift 5.7 required: Makefile 2022-08-21 19:21:26 +02:00
Gwendal Roué e150ca6864 Migration guide to GRDB 6 2022-08-21 19:21:26 +02:00
Gwendal Roué 9d7e27ced1 Add support for index origin 2022-07-25 08:07:27 +02:00
Gwendal Roué df7ba20ff2 Test columnInfos(in:) for views 2022-07-24 15:17:20 +02:00
Gwendal Roué 8dc0168841 Database.sqliteConnection setter is private 2022-07-24 15:14:35 +02:00
Gwendal Roué 23f4254ae3 Merge branch 'development' v5.26.0 2022-07-09 18:28:22 +02:00
Gwendal Roué 2df6a17c1c v5.26.0 2022-07-09 18:27:57 +02:00
Gwendal Roué 5aeee0e429 CHANGELOG 2022-07-09 17:17:27 +02:00