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
Gwendal Roué
1ea5d1713a
Cleanup
2020-04-12 10:04:09 +02:00
Gwendal Roué
0372c1dd63
Complete #747 : export the underlying SQLite library
2020-04-12 07:27:50 +02:00
Gwendal Roué
eee2c65c14
Merge branch 'development' into GRDB5
...
# Conflicts:
# CHANGELOG.md
# README.md
2020-03-29 18:55:06 +02:00
Gwendal Roué
97a84c6470
Fix failing test for #741
2020-03-29 12:09:58 +02:00
Gwendal Roué
dab8e28f6d
Merge branch 'master' into GRDB5
...
# Conflicts:
# GRDB/Migration/DatabaseMigrator.swift
# GRDB/QueryInterface/Request/QueryInterfaceRequest.swift
# README.md
2020-03-21 14:35:57 +01:00
Gwendal Roué
c1d1797576
Address #725
2020-03-18 20:36:56 +01:00
Gwendal Roué
19061934ce
SE-0242: Synthesize default values for the memberwise initializer
...
...and more initializers cleanup
2020-03-09 08:49:06 +01:00
Gwendal Roué
9aa67f9db9
SE-0255: Implicit returns from single-expression functions
2020-03-08 23:12:46 +01:00
Gwendal Roué
7865b0a2ee
SE-0249: Key Path Expressions as Functions
2020-03-08 19:58:51 +01:00
Gwendal Roué
b9d4a5215a
Remove deprecated DatabaseMigrator methods
2020-03-08 17:13:31 +01:00
Gwendal Roué
e9dd8b2b09
Enhance DatabaseMigrator querying methods
...
// New
dbQueue.read(migrator.hasCompletedMigrations)
dbQueue.read(migrator.completedMigrations).contains("v2")
dbQueue.read(migrator.completedMigrations).last == "v2"
dbQueue.read(migrator.appliedMigrations)
// Deprecated
migrator.hasCompletedMigrations(in: dbQueue)
migrator.hasCompletedMigrations(in: dbQueue, through: "v2")
migrator.lastCompletedMigration(in: dbQueue) == "v2"
migrator.appliedMigrations(in: dbQueue)
2020-03-07 13:59:46 +01:00
Gwendal Roué
f5019eeb60
Merge branch 'development' into dev/barrierMigrations
...
# Conflicts:
# GRDB/Migration/DatabaseMigrator.swift
2020-03-01 09:13:45 +01:00
Gwendal Roué
0e43f1b95a
appliedIdentifiers always filters out unknown migrations
2020-03-01 08:58:50 +01:00
Gwendal Roué
e1b14d4ee5
DatabaseMigrator uses barrierWriteWithoutTransaction
...
This prevents concurrent reads from reading right in between two migration transactions
2020-02-29 17:26:59 +01:00