Commit Graph
996 Commits
Author SHA1 Message Date
Gwendal Roué 8f5c7985e5 ValueObservationRecorder 2020-03-21 14:36:48 +01:00
Gwendal Roué 65b8fbb361 Remove useless print() statements 2020-03-21 14:36:48 +01:00
Gwendal Roué 1c59278115 Prefer dbResult argument name for async read closures 2020-03-21 14:36:48 +01: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é a0faf6aa68 Support for nil assignment 2020-03-18 19:34:43 +01:00
Gwendal Roué 936c92eba6 All value reducers must emit an initial value
This disqualifies compactMap as a valid ValueObservation transformation: it has been removed.

This simplifies implementation as well.
2020-03-12 07:18:40 +01:00
Gwendal Roué 5e0535d511 ValueReducer creation does not need database access 2020-03-11 22:00:07 +01:00
Gwendal Roué b96d71d937 Remove public ValueObservation factory methods that accept a _ValueReducer 2020-03-11 21:38:48 +01:00
Gwendal Roué f80c5ce348 Make the ValueReducer protocol unavailable
# Conflicts:
#	GRDB/ValueObservation/ValueReducer/ValueReducer.swift
2020-03-11 21:38:20 +01:00
Gwendal Roué 4f74997235 Restore old disabled tests for cancelled ValueObservation 2020-03-10 22:06:41 +01:00
Gwendal Roué 6f239a5ad3 All ValueObservationScheduling cases now trigger an initial fetch 2020-03-10 19:42:58 +01:00
Gwendal Roué 4fe201f8aa Merge branch 'development' into GRDB5 2020-03-10 19:05:29 +01:00
Gwendal Roué 3973b66ab3 Fix and test throwingFirstError 2020-03-10 09:16:24 +01:00
Gwendal Roué c70b627f92 ValueObservation.start(in:onChange:) is unavailable
Hiding errors from user's sight was not a good idea
2020-03-10 08:09:53 +01:00
Gwendal Roué 9aa67f9db9 SE-0255: Implicit returns from single-expression functions 2020-03-08 23:12:46 +01:00
Gwendal Roué 8718d525d4 SE-0253: Callable values of user-defined nominal types 2020-03-08 20:36:49 +01:00
Gwendal Roué 7865b0a2ee SE-0249: Key Path Expressions as Functions 2020-03-08 19:58:51 +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é 41e0885bce Fix deprecation warning 2020-03-08 18:10:02 +01:00
Gwendal Roué 694adcec64 Remove other deprecated methods 2020-03-08 18:03:11 +01:00
Gwendal Roué 5dd86d2453 Remove deprecated ValueObservation methods 2020-03-08 17:53:39 +01:00
Gwendal Roué b9d4a5215a Remove deprecated DatabaseMigrator methods 2020-03-08 17:13:31 +01:00
Gwendal Roué 02890a6d3a Remove deprecated SQLLiteral.mapSQL(_:) 2020-03-08 16:28:44 +01:00
Gwendal Roué 0f503fe0db Remove deprecated FetchRequest.prepare(_: forSingleResult:) 2020-03-08 16:18:55 +01:00
Gwendal Roué 130e510f8c Remove deprecated passphrase methods 2020-03-08 16:00:19 +01:00
Gwendal Roué 9578f984ec Remove useless #if compiler/swift checks 2020-03-08 13:42:44 +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é ee64f8ff9d Rename statement argument methods 2020-03-04 08:43:31 +01:00
Gwendal Roué 7c684d06c1 Simplify schema cache management
We don't need EmptyDatabaseSchemaCache. It does not help unsafe reads to work better if concurrent writes modify the schema anyway.
2020-03-01 15:51:37 +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é ce0df653f4 Expose Database.erase() 2020-02-29 17:19:08 +01:00
Gwendal Roué 7af846c87f Rename new DatabaseMigrator methods 2020-02-29 15:07:36 +01:00
Gwendal Roué 9f46f34d16 Merge branch 'development' into dev/unappliedMigrations
# Conflicts:
#	CHANGELOG.md
2020-02-29 14:46:50 +01:00
Gwendal Roué e62df26a53 Disable flaky testDatabasePoolReleaseMemoryClosesReaderConnections
See https://github.com/groue/GRDB.swift/issues/489
2020-02-29 14:45:06 +01:00
Gwendal Roué b71de1559a Disable flaky testCachedStatementsAreNotShared
See https://github.com/groue/GRDB.swift/issues/679
2020-02-29 14:43:17 +01:00
Gwendal Roué c2c587752c Disable flaky testBusyModeTimeoutTooShort
It just ruins Travis builds :-(
2020-02-29 14:41:46 +01:00
Gwendal Roué d35d6fc2f8 Rename isMigrated(in:upTo:) to isMigrated(in:beyond:), introduce lastAppliedMigration(in:) 2020-02-28 14:27:52 +01:00
Gwendal Roué 91a3557281 Rename hasUnappliedMigrations to isMigrated 2020-02-28 07:40:19 +01:00
Gwendal Roué 92e8ef9b87 More DatabaseMigrator tests 2020-02-27 21:01:56 +01:00
Gwendal Roué 692af926be Tests for DatabaseMigrator.hasUnappliedMigrations 2020-02-27 20:51:44 +01:00
Gwendal Roué efcc3a3dfb Merge branch 'development' into dev/migration
# Conflicts:
#	CHANGELOG.md
2020-02-26 19:31:38 +01:00
Gwendal Roué 4f9878a1da Update tests for the deprecated registerMigrationWithDeferredForeignKeyCheck method 2020-02-26 13:57:49 +01:00
Gwendal Roué 9400e7f5d5 Fix tests for Xcode 10.3 2020-02-26 08:17:48 +01:00
Gwendal Roué bad8d85729 Add test for legacy literal expression function 2020-02-25 22:18:16 +01:00
Gwendal Roué cc495e3fd5 Failing test for literal expression function 2020-02-25 22:11:18 +01:00
Gwendal Roué cdda2852d3 Merge branch 'development' into dev/qualifiedSQLLiteral 2020-02-14 11:43:15 +01:00
Gwendal Roué d448bd8bd5 Test SQLLiteral.mapSQL qualification 2020-01-25 14:32:13 +01:00
Gwendal Roué e999ab5ecb Don't deprecate SQLLiteral.mapSQL, after all 2020-01-25 13:46:00 +01:00
Gwendal Roué db8585aa85 Test for SQLLiteral(expression) 2020-01-25 12:34:22 +01:00