alephao
aab2664431
fix: DispatchQueueExecutor sendable conformance on Linux
2025-09-18 08:27:14 +02:00
Gwendal Roué
f3acfecc16
DatabaseCollation no longer uses a deprecated String initializer
2025-09-13 12:21:36 +02:00
Gwendal Roué
6a25b3538e
DocC for GRDBSendableMetatype
2025-09-10 07:41:42 +02:00
Gwendal Roué
1a3842e4bc
Combine and concurrency: lol
2025-09-10 07:12:53 +02:00
Gwendal Roué
32ed290a1b
EncodableRecord is GRDBSendableMetatype
...
This allows us to apply the encoding strategies for Data, Date, UUID when we know we need it, i.e. when we know the primary key, and this happens when we access the database - in a nonisolated fashion.
2025-09-10 07:12:53 +02:00
Gwendal Roué
f88c7202cd
TableRecord is GRDBSendableMetatype
...
This is required because the value of databaseSelection is not required to be Sendable. This forces TableRecord.relationForAll to postpone the definition of the selection until we access the database - in a nonisolated fashion.
2025-09-10 07:12:53 +02:00
Gwendal Roué
79ce0ff5f3
Avoid a compiler warning
2025-09-10 07:12:53 +02:00
Gwendal Roué
f435715f75
ValueReducer is SendableMetatype
...
ValueReducer does not support isolated conformances: it must be able to reduce observed values when needed. This can happen in a nonisolated fashion.
2025-09-10 07:12:52 +02:00
Gwendal Roué
cf1702630f
DatabaseAggregate is SendableMetatype
...
DatabaseAggregate does not support isolated conformances: it must be able to aggregate values whenever a database access is performed. This can happen in a nonisolated fashion.
2025-09-10 07:12:52 +02:00
Gwendal Roué
fd7adf7fb3
SendableMetatype for compiler >= 6.2
2025-09-10 07:12:52 +02:00
Gwendal Roué
4cfa692ddd
Fix race condition regarding Task cancellation
...
This complements #1797 by making sure read-only transactions complete correctly, even if the task is cancelled.
2025-09-10 07:12:11 +02:00
Gwendal Roué
8dfbbb50f6
TODO
2025-09-10 06:51:14 +02:00
Gwendal Roué
3f69614405
DatabaseFunction with raw xFunc
...
No use right now, but I was really bugged that we could not use raw sqlite3_result_xxx methods from custom functions.
2025-09-02 08:09:16 +02:00
Gwendal Roué
b4f3a83755
Remove SwiftLint warning
...
If we don't have warnings about explicit nil initialization, then we have a warning about the name of a disabled rule which is now deprecated. In all cases, we have a warning.
So let's just write 2025 Swift, ignore that rule, and call it a day.
2025-09-02 08:07:16 +02:00
Gwendal Roué
215128390d
Fix race condition: prevent cancellation from cancelling other database accesses after database accesses has completed
...
Before this change, cancelling a database access could cancel *another* database access 😱
2025-07-23 12:01:58 +02:00
Gwendal Roué
6ca38eda3b
Give TableAliasBase a location in DocC
2025-07-20 14:38:15 +02:00
Gwendal Roué
b572982e34
Document RowDecodingError
2025-07-20 13:11:42 +02:00
Gwendal Roué
5a8b025ee8
TODO: test throwing row accessors of record collections and sets
2025-07-20 13:00:12 +02:00
Gwendal Roué
f72d0cecb2
Document throwing row accessors
2025-07-20 13:00:12 +02:00
Gwendal Roué
24e0f5ddeb
Make throwing row accessors public
2025-07-20 13:00:12 +02:00
Gwendal Roué
2b1b56ea47
Make RowDecodingError public
2025-07-20 13:00:12 +02:00
Gwendal Roué
ad704c58e5
Hide implementation of RowDecodingError
...
Turn the enum into a struct so that it can be made public without exposing internal details
2025-07-20 13:00:12 +02:00
Gwendal Roué
d242421862
Async methods accept a non-escaping closure
2025-07-19 16:42:17 +02:00
Gwendal Roué
7a1e65b142
Remove late cancellation checks
...
I'm slowly changing my mind about this.
2025-07-19 15:27:08 +02:00
Gwendal Roué
fb4578a7d6
Delete unused code
2025-07-19 15:26:46 +02:00
Gwendal Roué
6069e6d683
DatabasePool.barrierWriteWithoutTransaction can access task locals
2025-07-19 15:26:44 +02:00
Gwendal Roué
a703da9b27
Async version of Pool.barrier { ... }
2025-07-19 14:25:50 +02:00
Gwendal Roué
684266b7b8
DispatchQueueActor supports barriers in concurrent DispatchQueue
2025-07-19 14:25:50 +02:00
Gwendal Roué
cbbd0cb945
Add asserts about expected ends of transaction
2025-07-19 14:25:50 +02:00
Gwendal Roué
dd4227303a
DatabasePool unsafeRead can access task locals
2025-07-19 14:25:50 +02:00
Gwendal Roué
69b786dc9e
Allow COMMIT from a cancelled read-only access.
2025-07-19 14:25:50 +02:00
Gwendal Roué
c5ac6cdaa6
DatabaseSnapshotPool reads can access task locals
2025-07-19 14:25:50 +02:00
Gwendal Roué
e154a652dc
Don't check for reentrancy from async Pool.read
...
One can't call an async function from a database access anywau
2025-07-19 14:25:50 +02:00
Gwendal Roué
41d4f23a83
DatabasePool reads can access task locals
2025-07-19 14:25:50 +02:00
Gwendal Roué
27b7400979
Async version of Pool.get()
2025-07-19 14:25:50 +02:00
Gwendal Roué
e6847886db
Extract DispatchQueueActor
...
We'll probably need it in order to access pool elements with support for task locals
2025-07-19 14:25:50 +02:00
Gwendal Roué
c064515247
DatabaseQueue and DatabaseSnapshot reads can access task locals
2025-07-19 14:25:50 +02:00
Gwendal Roué
96236a3d44
Turn Database.cancel into a sendable closure
2025-07-19 14:25:50 +02:00
Jason Abbott
c7d50486ad
Merge branch 'groue:development' into development
2025-05-30 12:05:03 -06:00
Jason Abbott
93292d88f4
Make DatabasePreUpdateEvent.Kind Sendable, matching DatabaseEvent.Kind, and also duplicate comments from DatabaseEvent.Kind while here
2025-05-30 12:02:23 -06:00
Gwendal Roué
d1a2cb0948
All closures that accept DatabaseComponents can throw
2025-05-12 20:33:18 +02:00
Gwendal Roué
c2e6c86934
Warn against the independent observation of each element in a list.
2025-05-11 13:32:50 +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é
fedcdef65e
Fix typo
2025-05-11 11:21:48 +02:00
Gwendal Roué
2316fb3831
Prefer key paths when possible
2025-05-11 11:12:19 +02:00
Gwendal Roué
98e2812089
Convenience api for updating a single column
2025-05-11 10:58:09 +02:00
Gwendal Roué
8f6f1aa264
TODO
2025-05-11 10:57:28 +02:00
Gwendal Roué
96d04716c2
Update more documentation with the closure syntax
2025-05-11 10:57:20 +02:00
Gwendal Roué
004968517e
Update more documentation with the closure syntax
2025-05-10 17:43:22 +02:00