Commit Graph
2073 Commits
Author SHA1 Message Date
Gwendal Roué afcac0102f ⚠️ EXPERIMENTAL - SE-0430 sending parameter and result values 2024-07-27 16:37:33 +02:00
Gwendal Roué 5f26a7ac01 Replace Mutex.value with load() and store(_:)
... and fix logic bugs on the way.

Inspired by https://forums.swift.org/t/se-0433-synchronous-mutual-exclusion-lock/71174/58

Fixed bugs follow this pattern: https://forums.swift.org/t/se-0433-synchronous-mutual-exclusion-lock/71174/77
2024-07-27 16:37:33 +02:00
Gwendal Roué 91e1ca4bae Prefer Data over NSData 2024-07-27 16:37:33 +02:00
Gwendal Roué 135de3c56e ⚠️ StrictConcurrency: fix warnings about the transfer of non-sendable values
We use unsafe constructs that we'll be able to replace with transferring parameters when the feature ships in the language: https://forums.swift.org/t/how-can-i-use-region-based-isolation/71426/5
2024-07-27 16:37:33 +02:00
Gwendal Roué 87fb90ef97 StrictConcurrency: FetchRequestEraser is Sendable 2024-07-27 16:37:33 +02:00
Gwendal Roué 6898d8c915 StrictConcurrency: AdaptedFetchRequest.adapter is Sendable 2024-07-27 16:37:33 +02:00
Gwendal Roué 8b49360af1 StrictConcurrency: ValueObservation change callback is Sendable 2024-07-27 16:37:33 +02:00
Gwendal Roué b4677dede4 StrictConcurrency: DatabaseRegionConvertible is Sendable
A ValueObservation will use such an object from database readers, writers, and the main thread: they must support all isolation domains.
2024-07-27 16:37:33 +02:00
Gwendal Roué 88539df543 StrictConcurrency: use a Sendable strong reference 2024-07-27 16:37:33 +02:00
Gwendal Roué 991d2c8bbc StrictConcurrency: UIApplication is MainActor-isolated 2024-07-27 16:37:33 +02:00
Gwendal Roué 3995bfdbec StrictConcurrency: workaround warning about UIApplication.xxxNotification 2024-07-27 16:37:33 +02:00
Gwendal Roué b11c5dd25b DatabaseCursor has a primary associated type 2024-07-27 16:37:33 +02:00
Gwendal Roué a474a674b4 Project organization 2024-07-27 16:37:33 +02:00
Gwendal Roué 2ce8a6191d Split Row.swift into focused files 2024-07-27 16:37:33 +02:00
Gwendal Roué ac33856f31 SQL is Sendable 2024-07-27 16:37:33 +02:00
Gwendal Roué cfd4a71efa writePublisher(updates:thenRead:) requires a Sendable Value
... But I don't know if region-based isolation and SE-0430 can relax this constraint or not.
2024-07-27 16:37:33 +02:00
Gwendal Roué e6a7d7dad4 Fix concurrency warning on SQLITE_TRANSIENT 2024-07-27 16:37:33 +02:00
Gwendal Roué 7d7dc8ea72 SerializedDatabase async access requires a Sendable closure 2024-07-27 16:37:33 +02:00
Gwendal Roué 7fd34012b4 WALSnapshotTransaction is Sendable 2024-07-27 16:37:33 +02:00
Gwendal Roué 2aabc4c10e OnDemandFuture fulfill is Sendable 2024-07-27 16:37:33 +02:00
Gwendal Roué f13b2d2eb4 Pool is Sendable 2024-07-27 16:37:33 +02:00
Gwendal Roué 40090dbe00 Fix concurrency warnings with DispatchSpecificKey 2024-07-27 16:37:33 +02:00
Gwendal Roué f362518dd6 LogErrorFunction is Sendable 2024-07-27 16:37:33 +02:00
Gwendal Roué 4d9d67dd67 DatabaseCollation is Sendable 2024-07-27 16:37:33 +02:00
Gwendal Roué d138af2637 RowAdapter is Sendable 2024-07-27 16:37:32 +02:00
Gwendal Roué b26e9709e7 FilterCursor can't be made Sendable 2024-07-27 16:37:32 +02:00
Gwendal Roué 6e691fe71d DatabaseFunction is Sendable 2024-07-27 16:37:32 +02:00
Gwendal Roué 05f7d3c8d4 [BREAKING] Remove DatabaseFuture and concurrentRead
That's one less DispatchSemaphore. We don't need this method anymore.
2024-07-27 16:37:32 +02:00
Gwendal Roué 54ffb21fb8 Configuration is Sendable 2024-07-27 16:37:32 +02:00
Gwendal Roué f7dc72a5f3 TransactionClock is Sendable 2024-07-27 16:37:32 +02:00
Gwendal Roué e0d8e20bef BusyCallback and BusyMode are Sendable 2024-07-27 16:37:32 +02:00
Gwendal Roué 00ccab06bd Rename LockedBox to Mutex
Maybe we'll be able to plug in the standard one eventually: https://forums.swift.org/t/pitch-synchronous-mutual-exclusion-lock/69889
2024-07-27 16:37:32 +02:00
Gwendal Roué 2f93f00b41 DatabaseCancellable is Sendable 2024-07-27 16:37:32 +02:00
Gwendal Roué 2661ff4690 [BREAKING] Remove Configuration.defaultTransactionKind
GRDB know defaults read-only transactions to DEFERRED, and write transactions to IMMEDIATE. See https://github.com/groue/GRDB.swift/issues/1483 for some context.
2024-07-27 16:37:32 +02:00
Gwendal Roué 2297c8f432 [BREAKING] Bump requirements: watchOS 7
Rationale: https://github.com/groue/GRDB.swift/issues/1472#issuecomment-1960696836
2024-07-27 16:37:32 +02:00
Gwendal Roué 679d6463fd [BREAKING] Stop exporting SQLite 2024-07-27 16:37:32 +02:00
Gwendal Roué 3685d6d505 Remove ill-advised TODO
This would force users to force-unwrap their custom `ColumnType(rawValue: "WHATEVER")!`
2024-07-27 16:37:32 +02:00
Gwendal Roué 5ab166b9c3 [BREAKING] Bump requirements: Swift 5.10, Xcode 15.3, iOS 12, tvOS 12 2024-07-27 16:37:32 +02:00
Jason Abbott 14d2b931a4 Also return untrimmed comments when tracing without visible values 2024-07-17 09:17:03 -06:00
Jason Abbott 802b4ca78a Correct suffix/prefix test 2024-07-16 16:57:57 -06:00
Jason Abbott 1c60e5ef42 Show trigger comments for expanded statement tracing 2024-07-16 16:51:50 -06:00
Gwendal Roué bbbd6bba90 Add Set methods union, formUnion, intersection and formIntersection that accept a cursor. 2024-06-05 19:38:16 +02:00
Gwendal Roué c8bb0a4799 Improve the documentation about the scheduling of ValueObservation fetches 2024-04-21 14:42:47 +02:00
Gwendal Roué fab4638fc9 Database.StorageClass 2024-03-23 10:46:52 +01:00
Gwendal Roué c3e7736534 Dump schema 2024-03-17 20:45:31 +01:00
Gwendal Roué 43ced9b2f0 Trivial Sendable conformances
Either added, either made explicitly unavailable.
2024-03-17 18:25:04 +01:00
Gwendal Roué 4ffad63f1b Fix Swift 5.10 warning on WALSnapshot 2024-03-17 17:55:25 +01:00
Gwendal Roué d54d0abc07 Fix WALSnapshotTransaction so that it clears its schema cache if needed 2024-03-17 16:13:35 +01:00
Simon Jarbrant 4232fa687d Conform Database.ColumnType to Sendable 2024-03-08 14:28:36 +01:00
Ben Barnett 27a4215424 Add schemaName parameter to foreign key checking functions 2023-12-08 18:22:49 +00:00