Commit Graph
61 Commits
Author SHA1 Message Date
Gwendal Roué db01b0063c Fix a test that relied on observation of every single changes 2023-06-02 15:39:26 +02:00
Gwendal Roué 437b800d8c Add test for the SQLite file provided by @kustra
https://github.com/groue/GRDB.swift/issues/1383#issuecomment-1572897011
2023-06-02 08:34:14 +02:00
Gwendal Roué b840babb55 Document the intent of #1383 regression tests 2023-06-01 20:15:05 +02:00
Gwendal Roué 4ab8ac8d3f Failing test for #1383 (async version) 2023-06-01 19:53:34 +02:00
Gwendal Roué d66d2118b5 Failing test for #1383 2023-06-01 17:05:06 +02:00
Gwendal Roué 8b1b3b0396 Fix tests that relied on observation of every single changes 2023-04-29 12:47:25 +02:00
Gwendal Roué d07e8bd3a0 The scenario that leads to the #1362 deadlock 2023-04-18 18:22:47 +02:00
Matt Gallagher 7feaa748a4 Removed some unneeded configuration from the test. 2023-04-18 13:06:05 +10:00
Matt Gallagher c159638498 A test demonstrating deadlock when observer count exceeds size of DatabasePool. 2023-04-18 12:48:06 +10:00
Gwendal Roué 9011f71247 Fix tests for unavailable wal snapshots 2023-04-15 09:50:46 +02:00
Gwendal Roué 069bce217d Attempts at finding regression tests for #1362 2023-04-14 08:28:34 +02:00
Gwendal Roué f6e695a21d More explicit any/some 2023-04-08 12:01:59 +02:00
Gwendal Roué 5facc24ebb Fix compiler warnings for Swift 5.8 2023-03-22 18:40:37 +01:00
Gwendal Roué 0a544dc0d2 Cleanup relationships between SerializedDatabase, WALSnapshotTransaction, and DatabasePool
SerializedDatabase hides its allowsUnsafeTransactions property, and makes it thread-safe by protecting it inside its serialized dispatch queue.

WALSnapshotTransaction always notifies when the reader connection is no longer used, and reuses the "isInsideTransaction" wording.
2023-03-17 13:52:29 +01:00
Gwendal Roué d3c289a320 Availability checks cleanup 2023-01-22 12:37:40 +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é 847386860f Fix test compilation on Xcode 14
Grrr
2022-11-17 22:48:13 +01:00
Gwendal Roué e4c5cc3451 Test that DatabaseSnapshotPool can be used from ValueObservation 2022-11-17 22:04:06 +01:00
Gwendal Roué 4871304c60 Enable WALSnapshot on macOS (Xcode 14.1+) 2022-11-13 15:29:44 +01:00
Gwendal Roué d3ad7acd59 No WALSnapshot on macOS and macOS Catalyst
Fix #1276
2022-09-09 08:16:55 +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é 458e1e2675 BREAKING: throwing DatabaseQueue() initializer
As a consequence, FTS3.tokenize(_:) is a throwing method as well.
2022-08-21 21:22:33 +02:00
Gwendal Roué 23cbf13af0 Swift 5.7 required: Availability checks 2022-08-21 19:21:57 +02:00
Gwendal Roué 6da7d47394 Swift 5.7 required: Remove compiler checks 2022-08-21 19:21:57 +02:00
Gwendal Roué 38c0d68db7 WALSnapshot
SQLITE_ENABLE_SNAPSHOT is available from Xcode 14 :-)
2022-06-24 16:48:38 +02:00
Gwendal Roué 758f561fbf Raise timeout threshold for SQLCipher CI tests 2022-05-22 17:31:45 +02:00
Gwendal Roué 819ee588c9 Failing test for #1209 2022-04-30 14:26:04 +02:00
Gwendal Roué 1b3f1ed393 Fix typo 2022-04-30 13:26:25 +02:00
Gwendal Roué 209192d3a5 Require Swift 5.6 Compiler for Concurrency Support 2022-04-13 23:07:33 +02:00
Gwendal Roué 6ab3fea8fb Refactor ValueObservation 2022-03-17 18:44:30 +01:00
Gwendal Roué 8e84beee36 Fix Swift 5.6 warnings 2022-02-01 10:08:24 +01:00
Gwendal Roué 61b0df8017 Enable async APIs on Xcode 13.2+ only
Xcode 13.1 won't have access to async apis. This simplifies our availability checks.

The techniques were inspired from:

- https://github.com/swift-server/guides/blob/main/docs/concurrency-adoption-guidelines.md#api-design
- https://github.com/swift-server/guides/blob/main/docs/concurrency-adoption-guidelines.md#backwards-compatibility-of-declarations-and-checked-swift-concurrency
2021-12-08 11:17:40 +01:00
Gwendal Roué 6ec3ebc398 Merge branch 'development' into dev/async 2021-12-06 18:04:35 +01:00
Gwendal Roué 89b1783220 TrackingMode is a property of ValueObservation
No reducer changes the tracking mode, so let's simplify the code.
2021-12-02 17:22:18 +01:00
Gwendal Roué 6180e4b815 Fix for Swift 5.3 2021-12-02 17:22:18 +01:00
Gwendal Roué 85747935c8 ValueObservation can track an explicit database region 2021-12-02 17:22:18 +01:00
Gwendal Roué 485ce79293 More ValueObservation async cancellation test 2021-11-01 09:45:16 +01:00
Gwendal Roué 5725d9db21 Refactor the ValueObservation async cancellation test 2021-11-01 08:03:00 +01:00
Gwendal Roué 5f549ef6af Cleanup with Table 2021-11-01 07:22:09 +01:00
Gwendal Roué c755dc70ef Restrict async/await to Xcode 13.1+ 2021-10-30 20:09:39 +02:00
Gwendal Roué 2ad6131d08 Require canImport(_Concurrency)
This fixes the build for macOS 11.5
2021-10-17 13:26:41 +02:00
Gwendal Roué 646782d499 test AsyncValueObservation with all DatabaseQueue & Pool
Also use .trackingConstantRegion since it triggers optimizations
2021-10-17 13:24:10 +02:00
Gwendal Roué a888c46b1a New: AsyncValueObservation 2021-10-17 13:24:10 +02:00
Gwendal Roué 6ea1e6aeaf Test that pragma tables are not tracked 2020-12-23 10:41:03 +01:00
Gwendal Roué 46c3839ea0 ValueObservation tracks a varying database region by defaut 2020-11-07 13:01:51 +01:00
Gwendal Roué f84e25f929 Remove dependency on SQLITE_ENABLE_SNAPSHOT
Address #845 and #846
2020-10-06 08:30:41 +02:00
Gwendal Roué b02b995b76 Give more time to SQLCipher4 Travis tests 2020-07-13 20:15:27 +02:00
Gwendal Roué 4e8b231c42 Rename handleEvents arguments 2020-06-22 14:23:33 +02:00
Gwendal Roué dd76cdffec ValueObservation.handleEvents 2020-06-20 19:57:51 +02:00
Gwendal Roué 70714768d9 Always use snapshots apis through grdb_xxx shims 2020-06-14 15:38:16 +02:00