Commit Graph
135 Commits
Author SHA1 Message Date
Gwendal Roué 4c10899a3c Single Cross-Platform Target 2022-08-27 13:43:44 +02:00
Gwendal Roué d2dd18b3e5 Remove note and warning icons
Those are handled by Github now:
https://github.com/community/community/discussions/16925
2022-08-21 21:22:34 +02:00
Gwendal Roué a702fe6bc9 BREAKING: persistence callbacks, and support for RETURNING
- Replace performInsert, performUpdate, etc with callbacks: willInsert, aroundInsert, didInsert, etc.
- Always call didInsert, even with INSERT OR IGNORE
- Explicit conflict resolution in persistence methods
- Add ...AndFetch... methods
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é 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é 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é 86de843bda Swift 5.7 required: Xcode 14 updates 2022-08-21 19:21:57 +02:00
Gwendal Roué 811c41af6d @Query has been exported to https://github.com/groue/GRDBQuery 2021-11-25 15:25:40 +01:00
Gwendal Roué 988c7bb62f Query documentation 2021-11-25 13:56:07 +01:00
Gwendal Roué 51182fc862 Query documentation 2021-11-25 13:55:00 +01:00
Gwendal Roué 485509a8cc Query documentation 2021-11-25 13:47:27 +01:00
Gwendal Roué a81f80cddb Query documentation 2021-11-25 13:46:50 +01:00
Gwendal Roué d590a06212 Query documentation 2021-11-25 12:39:50 +01:00
Gwendal Roué b3a1497791 Query documentation 2021-11-25 12:38:27 +01:00
Gwendal Roué c7f0a80a91 Query documentation 2021-11-25 10:52:10 +01:00
Gwendal Roué 068081d043 Query documentation 2021-11-25 10:37:06 +01:00
Gwendal Roué 01ba7de2f9 Query documentation 2021-11-25 10:16:38 +01:00
Gwendal Roué 10e784bee3 Query documentation 2021-11-25 10:11:35 +01:00
Gwendal Roué 21c6c9c794 Query documentation 2021-11-25 09:49:19 +01:00
Gwendal Roué dec515aceb Query documentation 2021-11-25 09:42:21 +01:00
Gwendal Roué 9be04da707 Query documentation 2021-11-25 09:41:25 +01:00
Gwendal Roué 6b02b4ca02 Rename Query generic parameter to Request 2021-11-25 09:37:40 +01:00
Gwendal Roué 5983473aa5 Query documentation 2021-11-25 09:33:24 +01:00
Gwendal Roué 1c4456a9fc Query documentation 2021-11-25 09:28:59 +01:00
Gwendal Roué 82a2776acd Query documentation 2021-11-25 09:14:54 +01:00
Gwendal Roué c7fb5cb3e3 Query demo README 2021-11-24 20:48:56 +01:00
Gwendal Roué f726b670f9 Polish Query demo app 2021-11-24 20:18:37 +01:00
Gwendal Roué 62e710b9b1 Cleanup Query demo app 2021-11-24 19:16:39 +01:00
Gwendal Roué 66f953a21a Rename Query demo app 2021-11-24 17:19:07 +01:00
Gwendal Roué ceed45cf22 QuerySideEffect demo 2021-11-24 09:40:15 +01:00
Gwendal Roué 8bf45e5452 Remove debugging code 2021-11-07 14:46:36 +01:00
Gwendal Roué d85168dd3c Query cleanup 2021-11-07 13:47:04 +01:00
Gwendal Roué 7ed103d5e4 Documentation 2021-11-07 13:25:50 +01:00
Gwendal Roué b44a9eb470 Extract @Query into its own package 2021-11-07 12:03:55 +01:00
Gwendal Roué 65668cfc8e Documentation 2021-11-06 11:22:16 +01:00
Gwendal Roué 9249efbe6f Fix UIKit warnings 2021-11-06 09:43:38 +01:00
Gwendal Roué 1a87faacfa Merge branch 'development' into dev/async 2021-10-31 18:32:03 +01:00
Gwendal Roué 3e58f35f1e I'm so fed up with this
https://developer.apple.com/forums/thread/663975
2021-10-31 13:54:53 +01:00
Gwendal Roué 0317c4e454 Reuse screenshot of Combine demo 2021-10-31 06:06:55 +01:00
Gwendal Roué db78c22904 Demo app requirements 2021-10-31 06:04:46 +01:00
Gwendal Roué c755dc70ef Restrict async/await to Xcode 13.1+ 2021-10-30 20:09:39 +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é 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