Commit Graph
1887 Commits
Author SHA1 Message Date
Gwendal Roué c4c0b1ce90 Test and fix unsafe and async DatabaseSnapshotPool 2022-11-14 19:10:52 +01:00
Gwendal Roué 9ac8c0703d Remove dead code 2022-11-14 19:02:10 +01:00
Gwendal Roué 433ed36a4b More documentation about transactions 2022-11-14 18:51:39 +01:00
Gwendal Roué c23b93d71b Document that reentrant database accesses use the current database connection when possible 2022-11-14 18:38:33 +01:00
Gwendal Roué b8bc8273a9 Turn snapshot tokens into a proper reader: DatabaseSnapshotPool 2022-11-14 18:22:13 +01:00
Gwendal Roué bcb70855d5 Enhance WALSnapshotToken documentation 2022-11-14 10:42:09 +01:00
Gwendal Roué eaf8dc239a Simplify WALSnapshotToken creation 2022-11-14 10:39:48 +01:00
Gwendal Roué 6864e6b2fb Enhance registerAccess(to:) documentation 2022-11-14 08:47:58 +01:00
Gwendal Roué a71eb3d662 Introduce WALSnapshotToken 2022-11-13 18:28:54 +01:00
Gwendal Roué 4871304c60 Enable WALSnapshot on macOS (Xcode 14.1+) 2022-11-13 15:29:44 +01:00
Gwendal Roué cbac0e7286 Enhance Configuration.threadingMode documentation 2022-11-13 10:54:40 +01:00
Gwendal Roué 997d6cb677 DatabaseSnapshot does not require the WAL mode
One can create a snapshot from a read-only pool on a non-WAL database, and that's OK. The snaphost still sees an unchanging database content (but other connections can't write).
2022-11-13 10:54:40 +01:00
Gwendal Roué 51230834c8 Configuration.maximumReaderCount can be queried
This is useful for tools that adapt their own inner scheduling to the actual capacity for concurrent reads.
2022-11-13 10:54:40 +01:00
Gwendal Roué 638e586dbc Expose Database.registerAccess(to:)
This helps tools that intend to declare an observed region without directly accessing it. This will be necessary for (future) snapshot-based observations that postpone actual database access.
2022-11-13 10:54:40 +01:00
Gwendal Roué 6dc4d50e00 Expose Configuration.readQoS and writeQoS
This helps tools that perform their own asynchronous jobs that depend on database scheduling. By using the same QoS as the database, they won't create priority inversion or similar scheduling misuses.
2022-11-12 11:55:37 +01:00
Gwendal Roué 5d50e396c1 Enhance Configuration documentation 2022-11-12 11:55:37 +01:00
Gwendal Roué 1625bc83f8 Documentation organization 2022-11-11 11:34:02 +01:00
Gwendal Roué be9740b5f6 Discourage usage of reentrant by linking to the related doc 2022-11-10 08:50:41 +01:00
Gwendal Roué 3014ddb00a Enhance Documentation 2022-11-09 21:52:22 +01:00
Gwendal Roué 85b2e113b2 Relocate DatabaseSnapshot documentation 2022-11-09 17:16:03 +01:00
Gwendal Roué c5a0598cea DocC: Concurrency Guides 2022-11-09 13:22:53 +01:00
Gwendal Roué 71880a9b8e Enhance Documentation 2022-11-09 13:20:08 +01:00
Gwendal Roué 14fb1945be Fix documentation 2022-11-08 22:57:48 +01:00
Gwendal Roué 33cdf6f270 Extract <doc:DatabaseSchema> 2022-11-08 19:28:13 +01:00
Gwendal Roué ca079cab17 TODO 2022-11-08 19:28:09 +01:00
Gwendal Roué 0873474a17 DocC: SQL 2022-11-08 18:22:03 +01:00
Gwendal Roué 754ced7b5e Enhance DocC output for ForeignKeyViolation 2022-11-07 22:50:50 +01:00
Gwendal Roué fb81ec6792 Migrations Guide in now a DocC article 2022-11-07 22:44:37 +01:00
Gwendal Roué 2e5cf546c6 DocC: RowAdapter 2022-11-06 16:45:13 +01:00
Gwendal Roué 0c011b970b Add missing experimental notices 2022-11-06 16:31:12 +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é a89dad2554 Fix Swiftlint warnings 2022-10-29 14:21:33 +02:00
Gwendal Roué e79b6a5622 Fix typo 2022-10-21 08:50:01 +02:00
Gwendal Roué 9531a7f8fc More specialization 2022-09-17 15:49:28 +02:00
Gwendal Roué d3ad7acd59 No WALSnapshot on macOS and macOS Catalyst
Fix #1276
2022-09-09 08:16:55 +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é 2a3318ef9a ALTER TABLE DROP COLUMN is properly reported with SQLITE_ALTER_TABLE for SQLite 3.38+ 2022-09-07 08:51:05 +02:00
Gwendal Roué f2c46784a6 ArrayRowImpl is checked Sendable 2022-09-07 08:50:32 +02:00
Gwendal Roué 9340fdc7c2 DatabaseValue.Storage is checked Sendable 2022-09-07 08:02:34 +02:00
Gwendal Roué 65efc413fe Fix for failing test for #1274
https://github.com/groue/GRDB.swift/discussions/1274
2022-09-05 08:43:43 +02:00
Gwendal Roué 6add38e3e5 BREAKING: Allow ValueObservation to perform different kinds of fetch
We're interested in allowing observations to build values based on snapshots
2022-09-04 12:06:17 +02:00
Gwendal Roué 202b3e5620 Encapsulate ValueObservation database accesses
Also, enhance Database.isolated(readOnly:) by not creating a savepoint if the database is already inside a transaction.
2022-09-04 10:11:22 +02:00
Gwendal Roué f2859ff8bf Use SQLITE_OPEN_EXRESCODE when available 2022-08-28 12:50:47 +02:00
Gwendal Roué 040e5d9d87 WITHOUT ROWID check: prefer PRAGMA table_list when available
This avoids the undesired errors described in #945.
2022-08-28 12:28:39 +02:00
Gwendal Roué 189430c1fe PRAGMA table_list 2022-08-28 12:28:39 +02:00
Gwendal Roué 2a5626efea Replace if let x = x with if let x 2022-08-22 20:40:00 +02:00
Gwendal Roué 422e0ae85a BREAKING: Handles both commits and rollbacks
Replace afterNextTransactionCommit(_:) with afterNextTransaction(onCommit:onRollback:)
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