Commit Graph
79 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é cc5798cf1e WALSnapshotTransaction is Sendable 2024-08-26 08:27:34 +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
Ben Barnett ac475cc158 Add schemaName parameter to primaryKey(_:) 2023-12-06 20:32:17 +00:00
Gwendal Roué c7047c4b33 Trim SQL in DatabaseError descriptoin 2023-10-08 20:07:59 +02:00
Gwendal Roué e936d6b42d Fix DatabaseError documentation 2023-03-02 06:58:33 +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é 13c804d1cc DocC 2022-11-06 16:02:36 +01:00
Gwendal Roué 1818534513 DocC 2022-11-06 16:02:36 +01:00
Gwendal Roué df0ae43c5f Swift 5.7 required: Sendable 2022-08-21 19:21:26 +02:00
Ben Barnett 3f0a8e6730 Provide error message as a failure reason 2022-03-20 08:07:39 +00:00
Gwendal Roué b5395a097c Documentation 2022-01-29 15:27:40 +01:00
Gwendal Roué 99c596f778 Fix DatabaseError public initializer 2022-01-29 15:21:44 +01:00
Gwendal Roué fd22fac5c0 Don't shed too much light on expandedSQL & expandedDescription properties 2022-01-29 15:12:41 +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é 9f0ba49c93 DatabaseError.description no longer contains statement arguments
Use DatabaseError.expandedDescription in order to see statements arguments
2022-01-27 19:30:00 +01:00
Gwendal Roué 8760033045 Update the list of extended result codes from SQLite 3.37.2
This updated list contains SQLITE_CONSTRAINT_DATATYPE, introduced with strict tables.
2022-01-09 17:01:37 +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é 8ed16f4440 Fix some compiler warnings with -Xfrontend -warn-concurrency
https://twitter.com/olebegemann/status/1467893554915782668
2021-12-07 09:23:37 +01:00
Gwendal Roué 7af3858ff6 More robust DatabasePool.close() test 2021-11-07 08:17:48 +01: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é 89521a7288 Improve statement binding performance 2021-04-03 14:52:22 +02:00
Gwendal Roué b13922b76e Database schema cache distinguishes the main from the temp schema
Addresses https://github.com/groue/GRDB.swift/pull/946#issuecomment-805756799
2021-03-27 14:50:25 +01:00
Gwendal Roué 354b815835 Remove obsolete todos 2020-09-20 11:38:37 +02:00
Gwendal Roué 5820b30cc6 DatabaseError.description: output SQLite message before statement #820 2020-08-25 19:48:00 +02:00
Gwendal Roué 7f229468d2 Documentation 2020-07-12 15:12:04 +02:00
Gwendal Roué c82dbb35ad SQLLiteral and SQLRequest no longer have sql and arguments properties 2020-04-29 13:52:29 +02:00
Gwendal Roué 0372c1dd63 Complete #747: export the underlying SQLite library 2020-04-12 07:27:50 +02:00
Gwendal Roué 474310e00b More inspiration from CocoaError 2020-04-10 09:30:34 +02:00
Gwendal Roué ccacbc9706 ResultCode match errors 2020-04-09 19:52:39 +02:00
Gwendal Roué 9aa67f9db9 SE-0255: Implicit returns from single-expression functions 2020-03-08 23:12:46 +01:00
Gwendal Roué 00b0dc2a04 Remove availability checks for macOS 10.10 (forgotten in #719) 2020-03-08 19:08:15 +01:00
Gwendal Roué 6656f72782 Rename "lock prevention" to "suspension" 2019-12-12 08:47:49 +01:00
Gwendal Roué d9c26a40b4 Fix Swiftlint warning 2019-11-14 08:21:50 +01:00
Gwendal Roué d983c6407c Update the list of extended result codes 2019-11-08 09:03:55 +01:00
Gwendal Roué df6bb8761c Swiftlint + whitespace 2019-07-01 08:57:53 +02:00
Roberto Casula b6f988194c fix errors for Xcode 11 beta 2019-06-08 15:46:48 +02:00
Gwendal Roué 1f50b4fefe Integrate SQLCipher as a CocoaPod 2019-04-19 08:33:19 +02:00
Gwendal Roué a230fe400d Availability checks: assume iOS >= 9.0 2019-02-07 08:52:38 +01:00
Gwendal Roué 1108ba4bf2 DatabaseError gets a default message, derived from its resultCode 2018-11-16 09:07:52 +01:00
Gwendal Roué 5747d1cff0 No more #if swift(>=4.1) 2018-04-30 08:26:23 +02:00
Gwendal Roué 1cbe60a13f Better checks for Swift < 4.1 (thanks @hartbit!) 2018-03-12 18:33:06 +01:00
Gwendal Roué a75e519294 SE-0185: let Swift 4.1 generate as much Equatable and Hashable conformance as possible 2018-03-12 18:20:10 +01:00
Gwendal Roué 2289ed9d95 Cleanup Jazzy documentation from most redundant definitions and experimental APIs 2018-01-21 16:57:43 +01:00
Gwendal Roué 8a213af2ab Cleanup & whitespace 2017-10-30 12:25:12 +01:00
Gwendal Roué c61949ceaf DatabaseError.description contains primary result code, not extended result code. 2017-09-11 08:12:43 +02:00
Gwendal Roué c5da564fb3 Use built-in SQLite3 module when available 2017-08-19 15:21:44 +02:00
Gwendal Roué 973f38727d More Xcode-9 fixes 2017-06-09 06:44:26 +02:00
Gwendal Roué 63b3b4225a Rename package to GRDB, and rename SQLite module to CSQLite 2017-04-11 13:22:26 +02:00