Commit Graph
7 Commits
Author SHA1 Message Date
Gwendal Roué 54007a9ce1 Refactor demo apps for enhanced configuration management 2023-04-09 11:40:40 +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é 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é 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é ed8ff31b3e GRDBAsyncDemo 2021-10-17 13:26:41 +02:00