Gwendal Roué
f4b4035704
Fix Swiftlint warnings
2024-08-24 14:39:44 +02:00
Steven Roebert and Gwendal Roué
0ae3f32f7f
Added compiler checks for Swift 6 specific code
...
Co-authored-by: Gwendal Roué <gr@pierlis.com >
2024-07-13 12:53:00 +02:00
Steven Roebert
c977cb8226
Implemented support for single value decoding in _RowDecoder
2024-07-13 11:48:02 +02:00
Gwendal Roué
3043d7dca5
DatabaseUUIDEncodingStrategy is Sendable
...
Fix #1567
2024-07-11 07:46:23 +02:00
Gwendal Roué
e6d4223b14
EncodableRecord takes precedence over Encodable when a record is encoded with a SingleValueEncodingContainer.
2024-07-10 08:47:49 +02:00
Gwendal Roué
ba3c938eb9
Fix failing test for #1565
2024-07-09 13:42:52 +02:00
Gwendal Roué
53c40fd80f
Fix Swiftlint warning
2024-04-21 17:45:58 +02:00
Gwendal Roué
f1ff7f2a2a
Fix compiler warnings
2024-04-21 12:20:37 +02:00
Gwendal Roué
7110a1fab3
Fix failing tests for decodeNil()
...
Fix https://github.com/groue/GRDB.swift/issues/1531
2024-04-21 12:13:24 +02:00
Gwendal Roué
3521030e13
Test _RowDecoder.KeyedContainer.allKeys, contains(_:), and support some nested keyed containers
2024-04-21 12:13:24 +02:00
Gwendal Roué
ac8c4aea63
Report correct error when decoding NULL into Date or Data
...
Fixes #1512
2024-03-21 14:25:12 +01:00
Gwendal Roué
43ced9b2f0
Trivial Sendable conformances
...
Either added, either made explicitly unavailable.
2024-03-17 18:25:04 +01:00
Gwendal Roué
f4ac0ab119
Make it possible to observe the supplementary fetches
2023-10-08 20:41:05 +02:00
Gwendal Roué
5a42d78e06
Data decoding and encoding strategies
...
Users must be able to store JSON data as text in the database.
2023-10-04 19:55:12 +02:00
Gwendal Roué
b896923fd4
TODO GRDB7: remove painful optionals due to IGNORE
2023-10-01 15:37:27 +02:00
Gwendal Roué
ea7ebe1ff5
Fix failing test for #1390
2023-06-11 13:15:55 +02:00
Gwendal Roué
266efa041c
Expose FetchableRecordDecoder
2023-04-29 17:15:54 +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é
3382280cc3
Statement.execute(arguments:) uses temporary bindings
...
Inspired by @helje5 in https://hachyderm.io/@helge@mastodon.social/109978514220902036
Thank you!!
Now, onto cursors!
2023-03-11 12:10:25 +01:00
Gwendal Roué
b3763ad08e
RecordCursor: same documation as all cursors
2023-02-26 10:26:03 +01:00
Gwendal Roué
5ed44b94bc
More improvements to RecordTimestamps.md
2023-02-23 07:59:08 +01:00
Gwendal Roué
734d911416
Fix typo
2023-02-22 06:18:13 +01:00
Gwendal Roué
b0d73f3126
EncodableRecord.databaseChanges(modify:)
2023-02-21 22:48:37 +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é
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é
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é
4a4ff9950c
FetchableRecord.find() methods
2022-11-30 19:36:25 +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é
3014ddb00a
Enhance Documentation
2022-11-09 21:52:22 +01:00
Gwendal Roué
71880a9b8e
Enhance Documentation
2022-11-09 13:20:08 +01:00
Gwendal Roué
4307f6a680
Fix Swiftlint warnings
2022-11-06 18:43:00 +01:00
Gwendal Roué
13c804d1cc
DocC
2022-11-06 16:02:36 +01:00
Gwendal Roué
811d287bd9
Row.withUnsafeData
2022-11-06 16:02:36 +01:00
Gwendal Roué
1818534513
DocC
2022-11-06 16:02:36 +01:00
Gwendal Roué
9531a7f8fc
More specialization
2022-09-17 15:49:28 +02: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é
c2e4aaf51d
Throw SQLITE_MISUSE in case of programmer error in the aroundXxx callbacks
...
While writing SingletonRecordTest.swift, I tried the solution below, in order to turn a failed update into an insert:
func aroundUpdate(_ db: Database, columns: Set<String>, update: () throws -> PersistenceSuccess) throws {
do {
_ = try update()
} catch {
insert(db)
}
}
But this can't work. This `insert(db)` is unable to provide the information we need in `update()`: the result of the eventual RETURNING clause, and the PersistenceSuccess that contains the persisted PersistenceContainer.
So we now detect two misuses: 1) not calling the action method, and 2) not rethrowing the error of the action method.
2022-08-25 19:05:27 +02:00
Gwendal Roué
327911d057
Upsert: add support for conflict target and assignments
2022-08-23 20:02:17 +02:00
Gwendal Roué
2a5626efea
Replace if let x = x with if let x
2022-08-22 20:40:00 +02:00
Gwendal Roué
2789444acd
Enable UPSERT and RETURNING with SQLCipher
2022-08-21 21:22:34 +02:00
Gwendal Roué
37f0a0bb9a
BREAKING: throwing EncodableRecord.encode(to:)
2022-08-21 21:22:34 +02:00
Gwendal Roué
8f562d3e11
NEW: Upsert
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é
0ed9367b26
BREAKING: DatabaseCursor no longer exposes its prepared statement
2022-08-21 21:22:34 +02:00