Commit Graph
11428 Commits
Author SHA1 Message Date
Gwendal Roué 10a741a346 Concurrency Guide 2021-10-30 19:47:57 +02:00
Gwendal Roué 3c78029b3c SwiftUI demo apps: PlayerEditionView saves player when back button is pressed 2021-10-25 19:07:40 +02:00
Gwendal Roué 3ea6fb2201 Merge branch 'development' into dev/async 2021-10-25 18:23:00 +02:00
Gwendal Roué de7d5f42d4 Clarify the benefits of shared observations 2021-10-25 08:47:50 +02:00
Gwendal Roué 450a7c2d71 SharedValueObservation async sequence 2021-10-24 17:47:08 +02:00
Gwendal Roué 2542ad7de8 Reuse ValueObservationStart, and move BufferingPolicy to AsyncValueObservation 2021-10-24 17:33:32 +02:00
Gwendal Roué 2a665df672 Merge branch 'development' into dev/async 2021-10-24 17:13:16 +02:00
Gwendal Roué bddbc31733 Merge pull request #1088 from groue/dev/shareValueObservation
Shared ValueObservation
2021-10-24 17:11:31 +02:00
Gwendal Roué 92e4c8f785 I want a new keyboard ASAP 2021-10-24 17:06:25 +02:00
Gwendal Roué 909afc0233 Fix typo 2021-10-24 17:05:10 +02:00
Gwendal Roué d73228a812 Documentation 2021-10-24 17:04:07 +02:00
Gwendal Roué 76cac45720 Fix typo 2021-10-24 16:35:32 +02:00
Gwendal Roué 22a4f08f40 CHANGELOG 2021-10-24 16:25:18 +02:00
Gwendal Roué ae0edde7c5 Documentation 2021-10-24 16:22:47 +02:00
Gwendal Roué c62e4fd94c Documentation 2021-10-24 16:17:46 +02:00
Gwendal Roué 7690db9284 Documentation 2021-10-24 16:15:46 +02:00
Gwendal Roué 2f212b8a5f SharedValueObservation error handling 2021-10-24 15:46:32 +02:00
Gwendal Roué abc6c55e14 Documentation 2021-10-24 15:17:52 +02:00
Gwendal Roué 450ff62392 Fix SQLCipher tests 2021-10-24 14:03:39 +02:00
Gwendal Roué a5dd61ff13 Fix availability checks in tests
Fix `make test_framework_GRDBiOS_minTarget` with Xcode 13
2021-10-24 13:41:07 +02:00
Gwendal Roué c3618e0cf0 SharedValueObservation publisher 2021-10-24 12:38:00 +02:00
Gwendal Roué a3a804fa82 Upgrade CombineExpectations 2021-10-24 12:37:28 +02:00
Gwendal Roué 8ccaf59d4d Default SharedValueObservation extent: .whileObserved 2021-10-23 17:47:12 +02:00
Gwendal Roué 9e0b1b3ded SharedValueObservation 2021-10-23 17:23:48 +02:00
Gwendal Roué 0a65399a7b Merge branch 'development' into dev/async 2021-10-23 12:48:33 +02:00
Gwendal Roué 618969ab2a More tests for optional collections from prefetched rows 2021-10-23 12:46:30 +02:00
Gwendal Roué 53c662d179 Decode optional collections from prefetched rows
This allows to define records that only decode to-many associations when they are eager-loaded.

See https://github.com/groue/GRDB.swift/issues/1084#issuecomment-948880910
2021-10-23 12:40:55 +02:00
Gwendal Roué 02f71cfecc AsyncValueObservation: let user control buffering policy 2021-10-20 08:16:24 +02:00
Gwendal Roué 00cd547ea6 UIKit demo app: use UIAction 2021-10-19 20:12:26 +02:00
Gwendal Roué 66bbf15f58 UIKit demo app: use @IBSegueAction 2021-10-19 19:30:23 +02:00
Gwendal Roué dbb19979d6 Demo app: prefer tracking over trackingConstantRegion
For those specific player requests, trackingConstantRegion is _correct_. But readers may blindly copy and paste, and use trackingConstantRegion when they should not.

So the demo apps prefer the unoptimized but always-correct `tracking` method instead.
2021-10-19 08:57:45 +02:00
Gwendal Roué 0d8d40d683 Demo apps: document why we use .immediate observation scheduling 2021-10-19 08:55:41 +02:00
Gwendal Roué 5d69d2a35b All demo apps provide unbounded read-only access to the database
Also, UIKit app now does not have to deal with an initial asynchronous delivery of players
2021-10-19 08:54:48 +02:00
Gwendal Roué 128399871a Demo projects organization 2021-10-19 08:15:14 +02:00
Gwendal Roué 4dd5677755 Demo apps: rename newRandom to makeRandom 2021-10-19 08:03:56 +02:00
Gwendal Roué dbf3335188 Demo apps: prefer inserted(_:) over mutating a temp variable 2021-10-19 08:02:09 +02:00
Gwendal Roué 048082f4b2 Demo apps: prefer isEmpty(db) over fetchCount(db) == 0 2021-10-19 07:58:03 +02:00
Gwendal Roué 6a980f90da Async sequence is unsuitable for preventing flash of missing content
See https://forums.swift.org/t/52862 for a longer explanation.

Fortunately, we can base @Query on Combine publishers, which do not have this problem.
2021-10-18 08:41:44 +02:00
Gwendal Roué e4bfea8bcc Use inserted(_:) in order to avoid a temporary variable 2021-10-17 21:25:19 +02:00
Gwendal Roué 329a7c8301 @Query cleanup & documentation 2021-10-17 14:09:53 +02:00
Gwendal Roué 1ff5159d40 Add the MIT license to Query.swift
This file is designed to be copied into user apps: make sure the license comes along.
2021-10-17 13:38:28 +02:00
Gwendal Roué d6f8a9a9ea UIKit demo app is iOS15+/watchOS8+ 2021-10-17 13:26:42 +02:00
Gwendal Roué c711efc7e0 Combine demo app is iOS15+ 2021-10-17 13:26:42 +02:00
Gwendal Roué 01d2bc89a9 Cleanup async demo app 2021-10-17 13:26:42 +02:00
Gwendal Roué 6bcee422b7 Improve tests of async demo app 2021-10-17 13:26:42 +02:00
Gwendal Roué 07faea9cfe Restore demo app tests 2021-10-17 13:26:42 +02:00
Gwendal Roué b76950f695 Follow EnvironmentValues.managedObjectContext example: appDatabase is not optional 2021-10-17 13:26:42 +02:00
Gwendal Roué b9e79791a3 Modernize syntax 2021-10-17 13:26:42 +02:00
Gwendal Roué 533cef692f Use SwiftUI Label 2021-10-17 13:26:42 +02:00
Gwendal Roué 0bed585fd0 Use dismiss from SwiftUI environment 2021-10-17 13:26:42 +02:00