Commit Graph
607 Commits
Author SHA1 Message Date
Gwendal Roué 8cba324d6e Refactor the SQLite import
We can not use `#if Trait` because Xcode does not enable those compiler flags. Always count on Apple for delivering the best quality software.

So now we import the default SPM SQLite last, after all other cases have been excluded.

The GRDB framework (GRDB.xcodeproj and GRDB via CocoaPods) is distinct from the default SPM trait, so we detect it with GRDBFRAMEWORK.
2025-10-04 17:56:06 +02:00
Gwendal Roué 3f27fb9289 Fix #1820
The regression was introduced by c7bbebc
2025-09-29 19:35:00 +02:00
Gwendal Roué 37dde39557 Public Database.schemaSource and withSchemaSource(_:execute:) 2025-09-23 17:12:27 +02:00
Gwendal Roué e1abafaae3 Ignore schema source during migrations 2025-09-23 17:12:27 +02:00
Gwendal Roué f3acfecc16 DatabaseCollation no longer uses a deprecated String initializer 2025-09-13 12:21:36 +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é 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é 69b786dc9e Allow COMMIT from a cancelled read-only access. 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
Gwendal Roué 67b34dc57c TransactionObserver can access the database, even if the transaction was completed in a cancelled task.
Fix https://github.com/groue/GRDB.swift/discussions/1746
2025-03-22 12:13:42 +01:00
Gwendal Roué 5a4d9b5cb9 Let PRAGMA QUERY_ONLY statements run from a cancelled database access
Fix #1715
2025-02-04 19:35:39 +01:00
Gwendal Roué 0401d449bb Database.sqliteLibVersionNumber 2025-02-01 12:01:41 +01:00
Gwendal Roué 831e79ee82 JSONB functions and tests 2025-01-26 14:21:35 +01:00
Gwendal Roué 46e15616a7 [BREAKING] macOS 10.15+ 2024-09-21 14:28:24 +02:00
Gwendal Roué e4a4735494 [BREAKING] tvOS 13+ 2024-09-21 13:57:35 +02:00
Gwendal Roué 8c40592955 [BREAKING] iOS 13+ 2024-09-21 13:57:23 +02:00
Gwendal Roué 0e6ffeb2d5 Merge branch 'master' into GRDB7 2024-09-08 11:37:48 +02:00
Gwendal Roué cdb181d9ca Don't invoke sqlite3_db_release_memory on closed database connections 2024-09-04 09:21:30 +02:00
Gwendal Roué b85121d456 Database support for cancellation 2024-08-31 12:24:19 +02:00
Gwendal Roué 5333dbeff1 LogErrorFunction is Sendable 2024-08-25 16:26:38 +02:00
Gwendal Roué c1f59dfa2a [BREAKING] DatabaseCollation is no longer Hashable 2024-08-25 15:42:06 +02:00
Gwendal Roué a5806a0020 [BREAKING] DatabaseFunction is no longer Hashable 2024-08-25 15:42:06 +02:00
Gwendal Roué ad74526f6a BusyCallback and BusyMode are Sendable 2024-08-25 14:50:42 +02:00
Gwendal Roué e72a37d7d5 Rename LockedBox to Mutex 2024-08-25 12:40:28 +02:00
Gwendal Roué 451a9eb493 [BREAKING] Remove Configuration.defaultTransactionKind
GRDB now defaults read-only transactions to DEFERRED, and write transactions to IMMEDIATE. See https://github.com/groue/GRDB.swift/issues/1483 for some context.
2024-08-25 08:22:07 +02:00
Gwendal Roué 9e1ff42249 [BREAKING] Rename CSQLite to GRDBSQLite
Fix #1528
2024-08-24 18:15:57 +02:00
Gwendal Roué 9cd1d849cc [BREAKING] Stop exporting SQLite 2024-08-24 17:25:35 +02:00
Gwendal Roué c64bc11627 Remove ill-advised TODO
This would force users to force-unwrap their custom `ColumnType(rawValue: "WHATEVER")!`
2024-08-24 11:38:37 +02:00
Jason Abbott 14d2b931a4 Also return untrimmed comments when tracing without visible values 2024-07-17 09:17:03 -06:00
Jason Abbott 802b4ca78a Correct suffix/prefix test 2024-07-16 16:57:57 -06:00
Jason Abbott 1c60e5ef42 Show trigger comments for expanded statement tracing 2024-07-16 16:51:50 -06:00
Gwendal Roué c8bb0a4799 Improve the documentation about the scheduling of ValueObservation fetches 2024-04-21 14:42:47 +02:00
Gwendal Roué fab4638fc9 Database.StorageClass 2024-03-23 10:46:52 +01:00
Gwendal Roué c3e7736534 Dump schema 2024-03-17 20:45:31 +01:00
Gwendal Roué 43ced9b2f0 Trivial Sendable conformances
Either added, either made explicitly unavailable.
2024-03-17 18:25:04 +01:00
Simon Jarbrant 4232fa687d Conform Database.ColumnType to Sendable 2024-03-08 14:28:36 +01:00
Gwendal Roué e3cf966c81 Documentation organization 2023-12-01 08:02:32 +01:00
Gwendal Roué c5203f078d Make Database.readOnly public 2023-11-30 07:56:21 +01:00
Gwendal Roué d8760253ff Add missing DocC reference 2023-11-25 17:10:40 +01:00
Gwendal Roué f1a8c5ac92 Wording 2023-11-25 16:49:37 +01:00
Gwendal Roué 079c0c7f26 The unit of change notification is the event kind, not the region 2023-11-25 16:44:18 +01:00
Gwendal Roué 918afbd33e Fix failing tests for Database.notifyChanges(in:) and regular tables 2023-11-25 14:39:13 +01:00
Gwendal Roué b5cb8fadf0 Failing tests for Database.notifyChanges(in:) 2023-11-25 14:39:13 +01:00
Gwendal Roué ba320a08e3 Make dumpTables able to print views 2023-10-28 15:46:31 +02:00
Gwendal Roué 69ae4c4e96 Dump 2023-10-12 09:17:50 +02:00
Gwendal Roué 97e6f88b31 Add new .jsonText column type 2023-10-04 19:55:12 +02:00
Gwendal Roué f76093a0c7 Database.setUpWALMode() 2023-08-25 09:10:26 +01:00
Gwendal Roué 9ff58c32e7 Use CChar instead of Int8 when we deal with C strings 2023-07-29 11:13:41 +02:00
Gwendal Roué dd85e699e2 Help handling of columns with no declared type 2023-07-09 17:16:08 +02:00
László Kustra f113963d31 Remove obsolete SQLite trace logic, as min SQLite version is 3.19.3 2023-07-07 11:05:17 +02:00