Gwendal Roué
2c49a69f43
Raise a fatal error when the users filters a database view by primary key
...
Fixes #1648
2024-10-12 15:41:36 +02:00
Gwendal Roué
173f363bdc
TableRecord.databaseSelection should be declared as a computed property
2024-09-21 17:21:59 +02: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é
01308c6044
Fix compiler warnings about NSCache concurrency
2024-09-14 17:24:30 +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é
b1424d16d5
[BREAKING] PersistenceContainer is Sendable
2024-08-31 10:08:44 +02:00
Gwendal Roué
cd4e853b74
[BREAKING] insertAndFetch, saveAndFetch, and updateAndFetch no longer return optionals.
...
Those optionals were just an annoyance. Now, nil results are replaced with `RecordError.recordNotFound`. Such an error is only expected with the IGNORE conflict policy.
2024-08-24 17:02:49 +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é
840fa3b5da
RecordError DocC
2023-03-12 18:14:38 +01:00
Gwendal Roué
8cd71ac832
Fix TableRecord.databaseSelection sample code
2023-03-12 17:18:28 +01:00
Gwendal Roué
3b0cf1fb0b
FTS5 DocC
2023-02-19 17:38:19 +01:00
Gwendal Roué
aff924a72b
Upgrade Swiftlint and fix warnings
2023-02-04 11:23:14 +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é
5ab7bfb229
recordNotFound returns an error instead of Never
...
https://forums.swift.org/t/methods-that-throw-and-return-never/61715
2022-11-30 21:33:15 +01:00
Gwendal Roué
afc578db7f
TableRecord.recordNotFound() methods
2022-11-30 19:36:08 +01:00
Gwendal Roué
df3bd46346
Rename PersistenceError to RecordError
2022-11-30 19:11:07 +01: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é
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é
8c9ac0ecd2
Documentation for exists, isEmpty, saved, inserted
2021-10-17 12:28:42 +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é
7a046fb27e
exists(_:) quality of life improvements
2021-10-17 12:27:19 +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é
c4443eead8
SELECT * FROM cte is no longer a special case, because SQLGenerationContext knows about the available CTEs
2021-03-19 19:06:47 +01:00
Gwendal Roué
8ad096ae35
Refactor column counting for improved testability
2021-03-14 11:49:35 +01:00
Gwendal Roué
920417beb3
Replace protocols with enums
2021-02-14 18:28:15 +01:00
Gwendal Roué
7f229468d2
Documentation
2020-07-12 15:12:04 +02:00
Gwendal Roué
90f2642ec6
Make good use of the visitor pattern
2020-07-05 15:07:52 +02:00
Gwendal Roué
2201026ce8
Introduce FastPrimaryKeyExpression, drop SQLPrimaryKeyExpression
...
Also, don't let the user access this expression, so that he does not attempt at decoding it. Its only purpose is to generate efficient SQL.
2020-07-01 20:40:11 +02:00
Gwendal Roué
ab97ceb784
TableRecord.primaryKey
2020-06-15 14:08:50 +02:00
Gwendal Roué
e47a584c3e
TableRecord.selectionSQL can no longer be implemented 🤷
2020-04-29 21:51:02 +02:00
Gwendal Roué
84ca69d27c
Value quoting can now require a database connection
2020-04-29 11:03:51 +02:00
Gwendal Roué
8cb75dd814
Subqueries wip
2020-04-28 21:03:58 +02:00
Gwendal Roué
9aa67f9db9
SE-0255: Implicit returns from single-expression functions
2020-03-08 23:12:46 +01:00
Gwendal Roué
86e32cdc23
Cleanup SQLGenerationContext
2020-01-24 08:55:55 +01:00
gjeck
2717b52e97
Add cache for TableRecord.defaultDatabaseTableName
...
Resolves cpu/memory impact from repeated calls by cacheing the name in a
private global NSCache.
2020-01-16 09:59:18 -08:00
Gwendal Roué
8affc8abe4
Remove dead code
2019-02-17 13:24:37 +01:00
Gwendal Roué
af8971bcd8
Default implementation for TableRecord.databaseTableName
2018-05-22 22:14:18 +02:00
Gwendal Roué
1bf7f67008
Update inline documentation with singular table names
2018-05-01 20:32:18 +02:00
Gwendal Roué
66a425f718
Thread-safe table name disambiguation, via SQLGenerationContext. Merge SQLTableQualifier into TableAlias.
2018-05-01 14:44:51 +02:00
Gwendal Roué
3e46942f30
Associations
2018-04-29 18:16:39 +02:00
Gwendal Roué
7aacaef2cd
Foster autoIncrementedPrimaryKey in documentation
2018-04-21 20:11:34 +02:00