Commit Graph
18 Commits
Author SHA1 Message Date
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é 58293befc9 BREAKING: Optional is a database value like others 2022-08-21 21:22:34 +02:00
Gwendal Roué fe225fe452 BREAKING: Remove deprecated methods 2022-08-21 19:21:57 +02:00
Gwendal Roué effc991de1 Deprecate DatabaseRegion.init(table:)
This commit reverts #510
2021-12-12 12:36:27 +01:00
Gwendal Roué 9df0f4cdbd Inline documentation for annotated(withOptional:), annotated(withRequired:) 2021-12-05 15:04:44 +01:00
Gwendal Roué 564c4cef5c annotated(withOptional:), annotated(withRequired:) 2021-12-03 19:24:56 +01:00
Gwendal Roué e69092ca6a Add DatabaseRegionConvertible to Table 2021-12-02 09:45:38 +01:00
Gwendal Roué b4570c0e84 Fix typos in Table documentation 2021-10-17 12:56:24 +02:00
Gwendal Roué 5f44162abe Rename request.exists(_:) to isEmpty(_:) 2021-10-17 12:27:19 +02:00
Gwendal Roué 55b938a1f5 Test exists(_:), exists(_🔑) and exists(_🆔) 2021-10-17 12:27:19 +02:00
Gwendal Roué 0098369e29 Simplify Refinable 2021-06-27 13:11:26 +02:00
Gwendal Roué bdfd5ce277 Table: batch delete & update
Also, MutablePersistableRecord is no longer necessary for such operations. TableRecord is enough.
2021-06-21 18:08:27 +02:00
Gwendal Roué 629840f6f2 Table.fetchCount(_:) 2021-06-20 11:37:59 +02:00
Gwendal Roué 32bbee9c8a Tests for Table Associations 2021-06-20 11:07:38 +02:00
Gwendal Roué 92d10e2713 Table fetching methods 2021-06-19 17:31:23 +02:00
Gwendal Roué 3d855a6a90 Table request methods 2021-06-19 15:25:14 +02:00
Gwendal Roué d7971d76e7 Introduce Table 2021-06-19 14:30:04 +02:00