Commit Graph
1907 Commits
Author SHA1 Message Date
Gwendal Roué 65bd4d90c2 Enhance DatabaseRegionObservation documentation 2022-11-28 08:36:30 +01:00
Gwendal Roué 409bd3bb26 Move Database Observation documentation to DocC 2022-11-28 08:27:12 +01:00
Gwendal Roué fed4833764 Move DatabaseRegionObservation documentation to DocC 2022-11-27 18:45:48 +01:00
Gwendal Roué e3cc15707a Move ValueObservation documentation to DocC 2022-11-27 18:27:26 +01:00
Gwendal Roué 7a9b8093ed Fix Swiftlint warnings 2022-11-27 12:46:23 +01:00
Gwendal Roué f5ebf0de4d Use primary key definitions with NOT NULL constraint by default 2022-11-27 12:35:47 +01:00
Gwendal Roué 3074b61cb7 Move schema documentation to DocC 2022-11-27 11:07:13 +01:00
Gwendal Roué 6295f4609e More precise WALSnapshot creation errors 2022-11-25 08:31:47 +01:00
Gwendal Roué e430b4ebd7 DatabaseSnapshotReader reentrant read is not unsafe 2022-11-25 08:15:14 +01:00
Gwendal Roué 10596e17bf Cleanup snapshot configurations 2022-11-23 19:42:12 +01:00
Gwendal Roué 392e9e447d Shared in-memory databases 2022-11-23 18:32:57 +01:00
Gwendal Roué 0ba3dff901 Rewrite availability check for WAL snapshots
Also, enable WAL snapshots with SQLCipher, if SQLITE_ENABLE_SNAPSHOT is set.
2022-11-18 13:33:28 +01:00
Gwendal Roué fcf8ac43b7 Delete obsolete comment 2022-11-18 12:41:15 +01:00
Gwendal Roué 9b4d76ca37 Robustness: DatabaseSnapshotPool discards connections that have lost the snapshot 2022-11-18 08:53:39 +01:00
Gwendal Roué 9b663e3bcc Pool can discard elements after use 2022-11-18 08:52:52 +01:00
Gwendal Roué 8a42c11624 DatabaseSnapshotPool documentation 2022-11-17 22:38:41 +01:00
Gwendal Roué 79d4db7827 More DatabaseSnapshotPool tests 2022-11-17 21:56:01 +01:00
Gwendal Roué b1770e89b7 Introduce DatabaseSnapshotReader 2022-11-17 20:11:58 +01:00
Gwendal Roué 12d656d3a1 Let SQLite check if DatabaseSnapshotPool can be created 2022-11-17 20:01:17 +01:00
Gwendal Roué 0bc49460d7 DatabaseSnapshotPool uses its own pool of connections
In the previous implementation, the snapshot pool would use the same reader connections as the database pool. This would create problem with reentrant reads. Let's make things simple, and not share any database connection.
2022-11-17 18:36:17 +01:00
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