Gwendal Roué
d1a2cb0948
All closures that accept DatabaseComponents can throw
2025-05-12 20:33:18 +02:00
Gwendal Roué
034b241e71
Rename ColumnsProvider to DatabaseComponents
2025-05-11 13:10:19 +02:00
Gwendal Roué
814146c40d
DocC
2025-05-11 11:56:21 +02:00
Gwendal Roué
98e2812089
Convenience api for updating a single column
2025-05-11 10:58:09 +02:00
Gwendal Roué
d6ff3b14d4
DocC
2025-05-10 15:34:10 +02:00
Gwendal Roué
6cc3116ff4
TableAlias is generic
2025-05-10 14:52:48 +02:00
Gwendal Roué
be2fb76d77
DocC
2025-05-10 09:36:14 +02:00
Gwendal Roué
ed402d5de6
Use closure syntax for batch updates
2025-05-10 09:36:14 +02:00
Gwendal Roué
494e697e94
Warn against selectID() when the ID type is an optional.
2025-02-12 08:25:27 +01:00
Gwendal Roué
87b236dfe0
selectID
...
This reverts 7ffc332327
At the time, selectID was replaced with selectPrimaryKey(as:) because:
> 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??.
This problem is reintroduced, but we now recommend against optional ids in https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/recordrecommendedpractices . And record with optional ids can use selectPrimaryKey(as:).
2025-02-11 20:47:49 +01:00
Gwendal Roué
46e15616a7
[BREAKING] macOS 10.15+
2024-09-21 14:28:24 +02:00
Gwendal Roué
e4a4735494
[BREAKING] tvOS 13+
2024-09-21 13:57:35 +02:00
Gwendal Roué
8c40592955
[BREAKING] iOS 13+
2024-09-21 13:57:23 +02:00
Gwendal Roué
6a29d6c081
[BREAKING] Prefer Collection over Sequence for filter(keys:) and derived APIs
...
We were frequently turning those sequences into an Array in order to check their emptiness, and generally were not sure we'd iterate a sequence only once.
Also use `some Sequence` and `some Collection` whenever possible.
2024-09-08 12:52:27 +02:00
Gwendal Roué
56e2ab85b7
SQLAssociationCondition is Sendable
2024-08-25 18:06:29 +02:00
Gwendal Roué
6157a40dad
Fix DocC warnings
2024-08-24 16:34:35 +02:00
Gwendal Roué
79cb862478
[BREAKING] watchOS 7+
...
Rationale: https://github.com/groue/GRDB.swift/issues/1472#issuecomment-1960696836
2024-08-24 15:45:38 +02:00
Gwendal Roué
43ced9b2f0
Trivial Sendable conformances
...
Either added, either made explicitly unavailable.
2024-03-17 18:25:04 +01:00
Gwendal Roué
4a5d4d6e49
Fix Xcode 15 warnings
2023-06-06 08:06:06 +02:00
Gwendal Roué
ac214e6760
SE-0345: if let shorthand for shadowing an existing optional variable
2023-01-30 08:00:47 +01:00
Gwendal Roué
d3c289a320
Availability checks cleanup
2023-01-22 12:37:40 +01:00
baegteun
a9feac1339
♻️ :: OSX -> macOS in Availability Check
2023-01-17 13:58:37 +09:00
Gwendal Roué
4e4699ebed
Improve inline documentation
2022-11-26 16:26:46 +01:00
Gwendal Roué
13c804d1cc
DocC
2022-11-06 16:02:36 +01:00
Gwendal Roué
1818534513
DocC
2022-11-06 16:02:36 +01:00
Gwendal Roué
82b4d90a82
Xcode 14 RC doesn't ship with the Swift 5.6 stdlib
...
https://forums.swift.org/t/xcode-14-rc-cannot-specialize-protocol-type/60171
2022-09-09 08:16:55 +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é
1239c14e6d
Explicit initializers for HasOneThrough and HasManyThrough associations
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é
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