Commit Graph
341 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é 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é 5a4d9b5cb9 Let PRAGMA QUERY_ONLY statements run from a cancelled database access
Fix #1715
2025-02-04 19:35:39 +01:00
Gwendal Roué 46e15616a7 [BREAKING] macOS 10.15+ 2024-09-21 14:28:24 +02:00
Gwendal Roué 6a29d6c081 [BREAKING] Prefer Collection over Sequence for filter(keys:) and derived APIs
We were frequently turning those sequences into an Array in order to check their emptiness, and generally were not sure we'd iterate a sequence only once.

Also use `some Sequence` and `some Collection` whenever possible.
2024-09-08 12:52:27 +02:00
Gwendal Roué b85121d456 Database support for cancellation 2024-08-31 12:24:19 +02:00
Gwendal Roué b2286aaaab DatabaseCursor has a primary associated type 2024-08-25 13:08:46 +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é 6157a40dad Fix DocC warnings 2024-08-24 16:34:35 +02:00
Gwendal Roué 79cb862478 [BREAKING] watchOS 7+
Rationale: https://github.com/groue/GRDB.swift/issues/1472#issuecomment-1960696836
2024-08-24 15:45:38 +02:00
Gwendal Roué 29eb04c39a [BREAKING] iOS 12+ 2024-08-24 15:45:38 +02:00
Gwendal Roué 43ced9b2f0 Trivial Sendable conformances
Either added, either made explicitly unavailable.
2024-03-17 18:25:04 +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é 0b2b26fd11 A statement can delete even if it's not a DELETE statement (through triggers) 2023-07-29 11:08:55 +02:00
Gwendal Roué 6f18de6a94 Fix typo 2023-07-29 11:08:02 +02:00
Gwendal Roué 28c6ea96b4 Fix redundant_self_in_closure Swiftlint warning 2023-07-29 10:06:33 +02:00
Gwendal Roué f6e695a21d More explicit any/some 2023-04-08 12:01:59 +02:00
Gwendal Roué d5a41bd11b Disable SQLITE_STATIC optimization when there are too many arguments 2023-03-13 19:33:52 +01:00
Gwendal Roué b4e851aa49 More statement arguments documentation 2023-03-12 10:59:38 +01:00
Gwendal Roué 0c333b6e22 Performance improvements 2023-03-11 12:10:25 +01:00
Gwendal Roué 3382280cc3 Statement.execute(arguments:) uses temporary bindings
Inspired by @helje5 in https://hachyderm.io/@helge@mastodon.social/109978514220902036

Thank you!!

Now, onto cursors!
2023-03-11 12:10:25 +01:00
Gwendal Roué 60fa8a630f Improve Statement.databaseRegion documentation 2023-03-11 12:08:17 +01:00
Gwendal Roué 9ba64c2426 Statement argument validation: fix wrong documentation and strenghten tests 2023-03-11 09:12:37 +01:00
Gwendal Roué 4f398a3457 Prepared statements documentation is now hosted in the Statement DocC 2023-03-04 17:08:12 +01:00
Gwendal Roué 44c13e5bff Make sure Statement.reset(withArguments:) resets 2023-03-04 16:28:45 +01:00
Gwendal Roué ac214e6760 SE-0345: if let shorthand for shadowing an existing optional variable 2023-01-30 08:00:47 +01:00
Gwendal Roué d3c289a320 Availability checks cleanup 2023-01-22 12:37:40 +01:00
baegteun a9feac1339 ♻️ :: OSX -> macOS in Availability Check 2023-01-17 13:58:37 +09:00
Gwendal Roué 4100b0627f DatabaseCursor DocC 2022-12-18 11:58:03 +01:00
Gwendal Roué 71880a9b8e Enhance Documentation 2022-11-09 13:20:08 +01:00
Gwendal Roué 0873474a17 DocC: SQL 2022-11-08 18:22:03 +01:00
Gwendal Roué 13c804d1cc DocC 2022-11-06 16:02:36 +01:00
Gwendal Roué 1818534513 DocC 2022-11-06 16:02:36 +01:00
Gwendal Roué 9531a7f8fc More specialization 2022-09-17 15:49:28 +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é 0ed9367b26 BREAKING: DatabaseCursor no longer exposes its prepared statement 2022-08-21 21:22:34 +02:00
Gwendal Roué eda403bd31 StatementArguments is Hashable 2022-08-21 21:22:34 +02:00
Gwendal Roué 84940af3dc Cleanup statement separator character set 2022-08-21 21:22:34 +02:00
Gwendal Roué e0786537db BREAKING: replace Int32 with CInt everywhere it is possible 2022-08-21 21:22:34 +02:00
Gwendal Roué 0879311646 Make TransactionObserver.swift easier to read
Add some documentation, and rename some types and variables.
2022-08-21 21:22:34 +02:00
Gwendal Roué 55445dcc7c NEW: RangeReplaceableCollection.append(contentsOf: cursor) 2022-08-21 21:22:34 +02:00
Gwendal Roué 11a6d53d8a SE-0326: closure result type inference
https://github.com/apple/swift-evolution/blob/main/proposals/0326-extending-multi-statement-closure-inference.md
2022-08-21 21:22:34 +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é dd55175978 SE-0345: if let x { }
https://github.com/apple/swift-evolution/blob/main/proposals/0345-if-let-shorthand.md
2022-08-21 21:22:34 +02:00
Gwendal Roué fe225fe452 BREAKING: Remove deprecated methods 2022-08-21 19:21:57 +02:00
Gwendal Roué df0ae43c5f Swift 5.7 required: Sendable 2022-08-21 19:21:26 +02:00
Gwendal Roué f0cfde682e Update outdated documentation 2022-05-18 08:12:00 +02:00
Gwendal Roué c60b8cfc53 Refactor prevention of truncate optimization
We now always use the same authorizer, which is always ready to prevent truncate optimization depending on the current transaction observers.
2022-01-30 14:07:43 +01:00
Gwendal Roué 9dc6fbd7f9 Fix #1159 2022-01-30 12:27:19 +01:00