Commit Graph
119 Commits
Author SHA1 Message Date
Gwendal Roué 98c58f4eef Fix more typos in public documentation 2026-11-02 20:27:37 +01:00
Gwendal Roué 909f7455e6 Fix more typos in public documentation 2026-11-01 21:01:03 +01:00
Micah Moore c24bf5d118 SQLCipher adjustments to support forks which want to enable SQLCipher using traits/swiftSettings
- Adds Database+SQLCipher extension with SQLCipher operations, enabled by #if SQLITE_HAS_CODEC
- Adjusts Import Statements to import SQLCipher when SQLCipher trait is enabled (or SQLCipher swiftSetting is set)
2026-01-14 11:32:48 -05:00
Gwendal Roué 361599aacd Task cancellation should turn all SQLITE_INTERRUPT errors into CancellationError, including errors thrown by statement compilation
I did not know statement compilation could fail when database is interrupted until #1838. A ROLLBACK statement would not even compile due to the FTS5 statement leak reported in https://sqlite.org/forum/forumpost/137c7662b389fa18
2025-12-09 21:38:15 +01:00
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é 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é 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é b85121d456 Database support for cancellation 2024-08-31 12:24:19 +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é 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é f649d9e19e Transaction Date 2023-02-18 08:31:05 +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é 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é 1818534513 DocC 2022-11-06 16:02:36 +01:00
Gwendal Roué e0786537db BREAKING: replace Int32 with CInt everywhere it is possible 2022-08-21 21:22:34 +02:00
Gwendal Roué 496c2ae359 Make Database+Statements.swift easier to read 2022-08-21 21:22:34 +02:00
Gwendal Roué fb6ea57d74 Don’t setup database observation in read-only connections.
Observation of read-only connections has turned useless since read-only transactions are no longer reported to TransactionObserver, in #1213
2022-08-21 21:22:34 +02:00
Gwendal Roué 36892fee55 BREAKING: Bump minimum SQLite version to 3.19.3 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é 72e8dd2816 Cleanup 2022-01-31 20:20:02 +01:00
Gwendal Roué 75f72472ff Cleanup 2022-01-31 08:37:57 +01:00
Gwendal Roué 4e65425c00 Cleanup 2022-01-30 14:41:29 +01:00
Gwendal Roué b8c0e9d2c2 Fix failing test for cached statement which does not prevent the truncate optimization 2022-01-30 14:24:28 +01: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é fc5138ae91 Configuration.publicStatementArguments
This flags allows database errors and trace events to hide or show statement arguments by default.
2022-01-28 13:57:12 +01:00
Gwendal Roué ed6c5438b9 Move DatabaseCursor state to Statement 2022-01-14 13:13:34 +01:00
Gwendal Roué 253c878367 Cleanup 2021-08-17 08:30:51 +02:00
Gwendal Roué f5b1219549 SQLStatementCursor no longer allocates a copy of the sql C string
Based on https://forums.swift.org/t/stable-pointer-into-a-c-string-without-copying-it/51244
2021-08-16 18:59:55 +02:00
Gwendal Roué dc3fac95db allStatements() can build statements without any arguments 2021-07-30 14:24:08 +02:00
Gwendal Roué 5cd34da6ca Use allStatements() from makeStatement() 2021-07-30 08:50:15 +02:00
Gwendal Roué c9eb67dae8 Database.allStatements(sql:literal:)
Addresses #1015
2021-07-29 22:41:49 +02:00
Gwendal Roué bf601e6810 Merge SelectStatement and UpdateStatement
Addresses #1015
2021-07-29 20:20:15 +02:00
Zev Eisenberg 8b060e6b09 Add angle brackets to URLs to make them clickable in Xcode's rendered documentation. 2021-07-20 20:53:58 -04:00
Gwendal Roué 2ce588ad76 Cached statements from a SQL literal
Addresses https://github.com/groue/GRDB.swift/issues/985#issuecomment-859570434
2021-06-19 13:57:53 +02:00
Gwendal Roué 051fdb37b6 Rename SQLLiteral to SQL 2021-03-21 13:33:49 +01:00
Gwendal Roué 5aa1184e68 Database.makeSelectStatement(literal:) 2021-03-18 19:24:24 +01:00
Gwendal Roué a6f7d9ba86 Database.makeUpdateStatement(literal:) accepts all arguments, or no arguments 2021-03-18 18:48:06 +01:00
Gwendal Roué fdc47d7158 Database.makeUpdateStatement(literal:) 2021-03-18 17:08:25 +01:00
Gwendal Roué 1f4db99a37 Documentation fix 2021-03-17 20:26:10 +01:00
Gwendal Roué ac436a2770 Make SQLLiteral less painful to use 2021-03-14 11:09:29 +01:00