Commit Graph
96 Commits
Author SHA1 Message Date
Gwendal Roué 43ced9b2f0 Trivial Sendable conformances
Either added, either made explicitly unavailable.
2024-03-17 18:25:04 +01:00
Ben Barnett 27a4215424 Add schemaName parameter to foreign key checking functions 2023-12-08 18:22:49 +00:00
Gwendal Roué 28c6ea96b4 Fix redundant_self_in_closure Swiftlint warning 2023-07-29 10:06:33 +02:00
László Kustra 4057e3be07 Use cross-platform ProcessInfo instance property 2023-06-29 16:23:36 +02:00
Gwendal Roué f633be4ba1 Fix test for #1360 2023-04-12 08:02:38 +02: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é 33cdf6f270 Extract <doc:DatabaseSchema> 2022-11-08 19:28:13 +01:00
Gwendal Roué cdf480ef1f Migrations guide cleanup 2022-11-08 08:41:10 +01:00
Gwendal Roué fb81ec6792 Migrations Guide in now a DocC article 2022-11-07 22:44:37 +01:00
Gwendal Roué 1be868c4b0 Fix documentation typo 2022-11-07 09:16:50 +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é 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é 9a9406a69d SE-0353: Constrained Existential Types
https://github.com/apple/swift-evolution/blob/main/proposals/0353-constrained-existential-types.md
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é 6f0d45eedb BREAKING: throwing DatabaseWriter.barrierWriteWithoutTransaction
It used to be rethrowing, but it was then unable to deal with closed databases.

The async version is modified accordingly: it accepts a Result<Database, Error>, instead of a raw Database.

DatabaseMigrator.asyncMigrate is impacted as well: it accepts a Result<Database, Error>, instead of a (Database, Error?) tuple.
2022-08-21 19:21:57 +02:00
Gwendal Roué b974dfa9a7 Use fetchSet when available 2022-03-04 11:40:42 +01:00
Gwendal Roué 95ce4a3f8a Drop async apis from DatabaseMigrator
This is because DatabaseMigrator can't be Sendable as long as it runs migrations that embed non-@Sendable closures.
2022-02-01 09:53:20 +01:00
Gwendal Roué ed4471c5b9 Configuration.writeTargetQueue 2022-01-29 17:45:21 +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é 97d4a60148 Merge branch 'development' into dev/async
# Conflicts:
#	Documentation/DemoApps/GRDBDemoiOS/README.md
#	Documentation/DemoApps/README.md
2021-11-27 12:05:24 +01:00
Gwendal Roué d8b83fba12 improve compilation time 2021-11-18 08:34:59 +01:00
Gwendal Roué f74ce91a17 Merge branch 'development' into dev/async
# Conflicts:
#	CHANGELOG.md
#	Documentation/Concurrency.md
#	README.md
2021-11-07 11:47:01 +01:00
Gwendal Roué af2d65ef49 Fix Swiftlint warnings 2021-11-07 10:32:00 +01:00
Gwendal Roué 127c4e0440 Rename methods that check foreign keys 2021-11-04 18:26:24 +01:00
Gwendal Roué 63ba4fb294 Rename unsafeWithoutDeferredForeignKeyChecks to disablingDeferredForeignKeyChecks 2021-11-04 15:10:33 +01:00
Gwendal Roué 6193c6aa00 foreignKeyViolations() and checkForeignKeyViolations() 2021-11-04 14:19:11 +01:00
Gwendal Roué 51c15e9db6 Precise handling of foreign key checks in migrations 2021-11-03 13:26:24 +01:00
Gwendal Roué 0a8967ccde move applied migration identifiers table creation to the top of migrations execution
https://github.com/zdnk/GRDB.swift/commit/51ff937397248355d4b264aedfd5a8f05893a2b8

Thanks @zdnk :-)
2021-11-03 08:33:09 +01:00
Gwendal Roué c755dc70ef Restrict async/await to Xcode 13.1+ 2021-10-30 20:09:39 +02:00
Gwendal Roué 0ead20cdd6 All async apis are experimental 2021-10-17 13:26:41 +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é 8936ef6a40 DatabaseMigrator async methods
migrate(_:)
migrate(_:upTo:)
2021-10-17 13:24:10 +02:00
Gwendal Roué d63429ea23 DatabaseMigrator.migrations 2021-09-03 14:31:46 +02:00
Gwendal Roué bf601e6810 Merge SelectStatement and UpdateStatement
Addresses #1015
2021-07-29 20:20:15 +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é 39eb57fe64 Fix for Xcode 11.4 2021-03-21 16:36:54 +01:00
Gwendal Roué 659e6a53bb Documentation 2021-03-20 14:40:17 +01:00
Gwendal Roué 21a2206443 Remove asynchronous migration to target identifier
Migrating up to a specific identifier is a test-oriented use case: it does not need any async version.
2021-03-20 14:20:41 +01:00
Gwendal Roué 8ad880e20d DatabaseMigrator publisher 2021-03-20 14:11:43 +01:00
Gwendal Roué c9c652dddc DatabaseMigrator async migrations 2021-03-20 13:25:43 +01:00
Gwendal Roué 8be0976bd1 Fix #931 2021-03-06 14:01:56 +01:00
Gwendal Roué 836efb120f Xcode 12.3 formatting 2020-12-23 12:13:05 +01:00
Gwendal Roué 800b9ffc3d Name the temporary database used by DatabaseMigrator.eraseDatabaseOnSchemaChange 2020-06-03 20:09:22 +02:00
Gwendal Roué 9ee3fd38b5 Remove mentions of unsupported iOS versions 2020-05-31 13:54:02 +02:00
Gwendal Roué cff769ddd5 Documentation 2020-05-11 08:54:31 +02:00
Gwendal Roué 3fea5db763 DatabaseMigrator.hasBeenSuperseded(_:) 2020-05-11 08:27:41 +02:00